|
From: | stephen yu |
Subject: | Fwd: GDB problem with mac os x environment |
Date: | Thu, 24 Jul 2014 14:01:37 -0700 |
So i'm using a x86_64-apple-darwin12.5.0 GDB on a MacBook Air.
I'm trying to do something as simple as gdb'ing into a executable file.
I type: gcc -g arrays.c -o arrays
creating an arrays executable, and arrays.dSYM,
and i type gdb arrays, and everything is fine.
It tells me its reading symbols from
arrays.dSYM/Contents/Resources/DWARF/arrays…done
The problem is, when i don't add the -g option, i just have
gcc arrays.c -o arrays, (essentially no arrays.dSYM)
and then type gdb arrays, i get
Reading symbols from arrays...
warning: `/var/folders/rj/d449b90d4_5986wxc66k_mc80000gn/T/arrays-J8mQ1j.o': can't open to read symbols: No such file or directory.
(no debugging symbols found)...done.
I observe that the executable is reliant upon arrays.dSYM. This becomes a problem, because let's say I want to debug something that doesn't come with its .dSYM file, i don't know how to use gdb on it.
on a fedora system that uses x86_64 redhat-linux-gnu, i use gdb arrays on the same exact arrays executable, and no problem, it doesn't give me any problems. So that led me to conclude that something is wrong with the gdb I have in the mac os x environment.
Perhaps there is a problem in my setup, or maybe i should just switch to a linux environment for gdb? But yeah, my email is address@hidden if you have any responses or suggestions.
Thanks,
Stephen Yu
[Prev in Thread] | Current Thread | [Next in Thread] |