Sponsored Content
Top Forums Programming Odd behavior from GDB while trying to cross-debug an embedded Linux application. Post 303031458 by Corona688 on Thursday 28th of February 2019 02:02:01 PM
Old 02-28-2019
I really doubt the crash is erroneous.

Quote:
So why do I think the gdbserver error is erroneous? Well because both applications are using the same exact version of glibc.
Crashes inside libc are almost always programmer-caused. This one is easy to cause:

Code:
#include <stdlib.h>

int main(void) {
        void *p=malloc(1000);
        free(p);
        free(p); // crash
}

Quote:
In fact, the only differences between the two applications is the changes I made to the code and that code works, I know because I tested it.
Never call code good because it "just works", especially when it crashes. What exact changes did you make to what exact code?

It could be the debugger that's crashing, I suppose. Unlikely but plausible.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Odd .sh behavior in script

Hello, I have been working on a what I thought was a fairly simple script for installing a software kit on Linux and Unix I am not new to scripting but am far from being fluent in sh scripting. any assistance would be appreciated. I have an odd bug occuring when executing the script. When... (2 Replies)
Discussion started by: robertmcol
2 Replies

2. HP-UX

Odd storage behavior

Hi, We have some troubles with our HP server (rx4640) running HP-UX 11.31. The server is attached to a JBod cabinet. If the JBod cabinet is powered on and we power on the server after then HP-UX can't find the devices (disks) at the cabinet. Does not help to run an ioscan -fnC disk. But if I power... (3 Replies)
Discussion started by: hoff
3 Replies

3. Programming

gdb: how to debug an executable file with a few command line papameters

If an executalbe file has several parameters, gdb can not pass parameters correctly. Let us see: run: ./executablefile1 agr1 arg2 arg3 debug: gdb executablefile1 run executalbefile1 arg1 arg2 arg3 then argv : executablefile1 argv : executablefile argv : arg1 ... (3 Replies)
Discussion started by: cdbug
3 Replies

4. Programming

gdb: problem while debug an executable file

I created one file (test.cpp)and complied it and get the executable file(test) and run it.It is giving the out put but when I am trying to debug that executable.I am getting the error -- please tell me the solutions?? Thanks in advance ..... (2 Replies)
Discussion started by: smartgupta
2 Replies

5. UNIX for Advanced & Expert Users

a question about debug using gdb(/lib32/libc.so.6: No such file or directory)

Hi all, (gdb) target remote 192.168.185.196:1389 Remote debugging using 192.168.185.196:1389 warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. 0x2fbd0800 in ?? () (gdb) l 1 ... (0 Replies)
Discussion started by: yanglei_fage
0 Replies

6. Programming

Debug two process Using GDB

Hi All I know How to attach a process to beubg it .But for my application I am using client as well server.Both are two separate process .Suppose I need to debug both .How to attach both of them together .Or I have to attach them separetly . Suppose client process id is 1325 and server is... (2 Replies)
Discussion started by: mr_deb
2 Replies

7. Programming

Can't debug: assert error with gdb (no problem without)

I'm sorry if the title is really criptic, but I don't know how to phrase my problem. I know I can't really ask for a solution, and I normally wouldn't but this is really escaping my abilities. Antefacts. I developed a program using the zeromq messaging library. I got to a point where the... (11 Replies)
Discussion started by: erupter
11 Replies

8. Cybersecurity

Odd behavior from passwd.

Hi Folks, Before I go off and start checking I'm just wondering if anyone has seen this behaviour before. # passwd e825390 Changing password for user e825390. New password: Retype new password: Retype new password: passwd: all authentication tokens updated successfully. As you can... (2 Replies)
Discussion started by: gull04
2 Replies
GDBINIT(5)						       GNU Development Tools							GDBINIT(5)

NAME
gdbinit - GDB initialization scripts SYNOPSIS
/etc/gdbinit ~/.gdbinit ./.gdbinit DESCRIPTION
These files contain GDB commands to automatically execute during GDB startup. The lines of contents are canned sequences of commands, described in the GDB manual in node "Sequences" -- shell command "info -f gdb -n Sequences". Please read more in the GDB manual in node "Startup" -- shell command "info -f gdb -n Startup". /etc/gdbinit System-wide initialization file. It is executed unless user specified GDB option "-nx" or "-n". See more in the GDB manual in node "System-wide configuration" -- shell command "info -f gdb -n 'System-wide configuration'". ~/.gdbinit User initialization file. It is executed unless user specified GDB options "-nx", "-n" or "-nh". ./.gdbinit Initialization file for current directory. It may need to be enabled with GDB security command "set auto-load local-gdbinit". See more in the GDB manual in node "Init File in the Current Directory" -- shell command "info -f gdb -n 'Init File in the Current Directory'". OPTIONS
SEE ALSO
gdb(1), "info -f gdb -n Startup" The full documentation for GDB is maintained as a Texinfo manual. If the "info" and "gdb" programs and GDB's Texinfo documentation are properly installed at your site, the command info gdb should give you access to the complete manual. Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H. Pesch, July 1991. COPYRIGHT
Copyright (c) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." gdb-Red Hat Enterprise Linux 7.6.1-51.el7 2014-06-10 GDBINIT(5)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy