gdb -arch flag not working
gdb -arch flag not working
- Subject: gdb -arch flag not working
- From: "Shawn Erickson" <email@hidden>
- Date: Mon, 21 Aug 2006 16:21:49 -0700
Just wanted to verify what a few others have reported recently...
gdb supports -arch ppc | i386 with the apparent intent allowing the
ability to work binaries/symbols from an arch other then the one you
happen to be running on but it appears to not function correctly. (I
guess it must work for some type of binaries??)
I reported this as <rdar://4692371>
Basically I get a "No such file or directory" failure when attempting
to load a binary arch other then what I am running on. (tried with
thinned binaries, Xcode 2.3 and Xcode 2.4, and running the platform
specific version of gdb directly... they all fail in the same way).
If I point gdb directly at the binary down in the app bundle it
doesn't complain about file not found but so far I haven't found how
to position/name the dSYM file so GDB will load the symbol
information.
-Shawn
######################### PowerMac Quad G5
[serickson@serickson-pmg5:/tmp/blah_Mac_UNI_debug]
[0:593] > file blah.app/Contents/MacOS/blah
blah.app/Contents/MacOS/blah: Mach-O fat file with 2 architectures
blah.app/Contents/MacOS/blah (for architecture i386): Mach-O executable i386
blah.app/Contents/MacOS/blah (for architecture ppc): Mach-O executable ppc
[serickson@serickson-pmg5:/tmp/blah_Mac_UNI_debug]
[0:594] > file blah.app.dSYM/Contents/Resources/DWARF/blah
blah.app.dSYM/Contents/Resources/DWARF/blah: Mach-O fat file with 2
architectures
blah.app.dSYM/Contents/Resources/DWARF/blah (for architecture i386):
Mach-O filetype=10 i386
blah.app.dSYM/Contents/Resources/DWARF/blah (for architecture ppc):
Mach-O filetype=10 ppc
[serickson@serickson-pmg5:/tmp/blah_Mac_UNI_debug]
[0:596] > gdb -arch ppc blah.app
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:06:22 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols
for shared libraries ........ done
** works, can do what I need to do **
[serickson@serickson-pmg5:/tmp/blah_Mac_UNI_debug]
[0:595] > gdb -arch i386 blah.app
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:15:11 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=powerpc-apple-darwin
--target=i386-apple-darwin"...blah.app: No such file or directory.
** fails to work **
######################### MacBook Pro
[serickson@vpwinxpsp1:/Volumes/Main/tmp/blah_Mac_UNI_debug]
[0:511] > arch
i386
[serickson@vpwinxpsp1:/Volumes/Main/tmp/blah_Mac_UNI_debug]
[0:512] > gdb -arch i386 blah.app
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:01:44 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for
shared libraries ....... done
** works, can do what I need to do **
[serickson@vpwinxpsp1:/Volumes/Main/tmp/blah_Mac_UNI_debug]
[0:513] > gdb -arch ppc blah.app
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:11:10 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin
--target=powerpc-apple-darwin"...blah.app: No such file or directory.
** fails to work **
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden