Re: Debugger Info

"Paul Pluzhnikov" <ppluzhnikov@earthlink.net>
4 Aug 2002 11:41:39 -0400

          From comp.compilers

Related articles
Debugger Info e_shamanth@yahoo.com (shamanth) (2002-07-21)
Re: Debugger Info ppluzhnikov@earthlink.net (Paul Pluzhnikov) (2002-07-24)
Re: Debugger Info Mark.van.den.Brand@cwi.nl (M.G.J. van den Brand) (2002-07-25)
Re: Debugger Info joachim_d@gmx.de (Joachim Durchholz) (2002-07-25)
Re: Debugger Info marcov@toad.stack.nl (Marco van de Voort) (2002-07-31)
Re: Debugger Info velco@fadata.bg (Momchil Velikov) (2002-07-31)
Re: Debugger Info sander@haldjas.folklore.ee (Sander Vesik) (2002-07-31)
Re: Debugger Info ppluzhnikov@earthlink.net (Paul Pluzhnikov) (2002-08-04)
Re: Debugger Info srikanth@cup.hp.com (srikanth) (2002-08-14)
| List of all articles for this month |
From: "Paul Pluzhnikov" <ppluzhnikov@earthlink.net>
Newsgroups: comp.compilers
Date: 4 Aug 2002 11:41:39 -0400
Organization: EarthLink Inc. -- http://www.EarthLink.net
References: 02-07-085 02-07-093 02-07-144
Keywords: debug
Posted-Date: 04 Aug 2002 11:41:39 EDT

"Sander Vesik" <sander@haldjas.folklore.ee> writes:


> Paul Pluzhnikov <ppluzhnikov@earthlink.net> wrote:
>
> > Here are the features that gdb lacks, or misfeatures (it may
....
> > - unable to set break points in DSO until that DSO has been
> > loaded (makes debugging static constructors rather tricky)
>
> I think this is a (mis)feature of the dynamic linker (ld.so) rather
> than the debugger. To do this you would need direct support for it
> in the dynamic linker (at the very least) or being able to use a
> different, debug-enbled dynamic linker. At least on ELF platforms.
>


From Solaris "Debugging a Program With dbx"
ftp://192.18.99.138/806-7983/806-7983.pdf:


In the section discussing debugging shared libraries and LD_PRELOAD:


        Whenever you load a new program, dbx automatically executes the
        program up to the point where rtld has completed construction
        of the link map. dbx then reads the link map and stores the
        base addresses. After that, the process is killed and you see
        the prompt. These dbx tasks are conducted silently.


Of course this does not address libraries loaded with dlopen(), but at
least you can immediately set breakpoints in explicitly-linked shared
libraries, without having to:


      break main ## sets BP1
      run
      ## hit BP1
      break __libc_malloc
      delete 1
      run


Cheers,
--
In order to understand recursion you must first understand recursion.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.