segfault at 0 ip (null) sp bf9ed55c error 4 in appname[8048000+252000] If I don’t have the IP address, how do I determine where the crash occurred? does it being (null) mean anything useful? in the appname[8048000+262000] = 0x82Aa000 is that supposed to give a clue? is it the 0x82AA000 the value I should try to use, both nm output and
Tag: debugging
how to save “set solib-search-path”
I wonder linux gdb debugging. I have 1 execute file, 1 core dump file. so, I opened it in linux like this, but, I only show error message. so, I input command, and symbol read succeed. and, I input command and, I reopen dump file. like this, but still show same error message. I don’t want to show this error
How to create high frequency logging (tracing) in Linux userspace?
I am starting a new user-space application and i want to create some common utilities for logging and tracing i distinguish between the 2 utilities. in my prespective logging should be something that is always on and used for high level information and debug. Where as tracing is much more detailed and more frequent. i think syslog is a good
Application is getting killed without any reason. Suspecting high BSS. How to debug it?
I have been running my application successfully in CentOs6.6. Recently, the hardware(motherboard and RAM) was updated and my application is getting killed now without any reason at all. File and ldd output Output of strace GDB While debugging, observed that the bss memory is huge(~6GB). The system has 4GB RAM and I think this could be the reason for the
What mechanism does gdb use to know where to “finish” a function call?
In gdb, when debugging inside a function, we can use “finish” command to run to the end of a function. My question is: how does gdb know the ending position of a function, especially when there’s no debugging symbol to match source code “{}”? I guess gdb looks for either “leave” or “mov %rbp, %rsp,pop %rbp” under x86 in order
Adjust context switch frequency in Java on Linux
I’m looking into a potential concurrency issue in some binary Java code. The code sometimes has a strange behavior, but I’m not sure if it’s actually due to concurrency issues in the code itself, or if it’s something else. I haven’t been able to reproduce the strange behavior myself, but only seen it happening in our log files. Is there
strace -e trace=network only showing SIGCHLD?
I am using the command: strace -tt -o ${filename} -e trace=network gdb –args ${EXECUTABLE} to track which system calls occur whilst connecting to and sending messages to a peer. However, I am only receiving the following entries: Should I not see the socket calls to read() close() etc? Answer Using strace with gdb –args ${EXECUTABLE} prints syscall of gdb, instead
gdb catch syscall condition and string comparisson
I would like to catch a system call (more specifically access) and set a condition on it based on string comparison (obviously for arguments that are strings). Specific example: when debugging ls I would like to catch access syscalls for specific pathnames (the 1st argument) int access(const char *pathname, int mode); So far, I have succeeded in manually inspecting the
How to predict a size of a process’ core file before generating it with GDB?
How can the size of the core file be predicted based on for example /proc/pid/maps, /proc/pid/coredump_filter, values shown by top like VIRT RES and so on? Generally speaking, on what does the size of the core file depend and what exactly does the file contain (which parts of virtual address space?)? I’m a little confused by a fact that the
How to catch new thread in gdb console mode?
I am running my Qt app from gdb, and i want to stop when new threads creates. (when gdb prints message [New Thread address (LPW number)]. I have set breakpoint b __pthread_create_2_1. That allows me to catch most of new threads prints. but i still got few new threads that are not catched. What else can i do to catch