• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gdb can't find main?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb can't find main?


  • Subject: Re: gdb can't find main?
  • From: Jason Molenda <email@hidden>
  • Date: Thu, 14 Apr 2005 11:29:41 -0700

Hi Justin,

On Apr 14, 2005, at 11:20 AM, Justin Walker wrote:

(gdb) b main
Breakpoint 1 at 0x262c: file iset_str.c, line 28.


The address for main, according to 'nm', is 0x2abc. It appears to be the only 'main' in the nm list (which one would hope would be the case). 0x262c does not show up in the list produced by 'nm'.


Gdb appears to be matching a gmp name because the addresses in gmp.dylib are in that range. Are the addresses in dylibs unrelocated?


Ah yes, of course. Before program execution gdb would get confused about which binary (application/dylib) contains the symbol with dylibs at a load addr of 0x0. You can work around this by linking gmp with a -seg1addr (any old big addr is fine, it'll slide if it conflicts with something). I don't remember exactly what is supported in Xcode 1.5. Does gdb's break command accept the -shlib option? e.g.

b -shlib hecke main

where the "shlib" is the name of the main executable.

Jason
_______________________________________________
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


  • Follow-Ups:
    • Re: gdb can't find main?
      • From: Justin Walker <email@hidden>
References: 
 >gdb can't find main? (From: Justin Walker <email@hidden>)
 >Re: gdb can't find main? (From: Justin Walker <email@hidden>)

  • Prev by Date: Re: gdb can't find main?
  • Next by Date: SCM Compare and diff now find mostly identical files are entirely different.
  • Previous by thread: Re: gdb can't find main?
  • Next by thread: Re: gdb can't find main?
  • Index(es):
    • Date
    • Thread