Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Koning <paul_koning@dell.com>
To: Richard Silverman <res@qoxp.net>
Cc: GDB Mailing List <gdb@sourceware.org>
Subject: Re: teaching gdb about new types?
Date: Fri, 29 Apr 2011 20:53:00 -0000	[thread overview]
Message-ID: <0CC3B1C2-DD9F-4A4A-AA07-9E2FC72D6C9D@dell.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1104291638510.11634@seraph.oankali.net>

If you're worried about types rather than line numbers, I would think that all you'd need is a symbol table that has the right type definitions in it.  If you know what they are supposed to be, you can supply such a symbol table easily enough.  

	paul


On Apr 29, 2011, at 4:42 PM, Richard Silverman wrote:

> On Fri, 29 Apr 2011, Paul Koning wrote:
> 
>> The simple answer is to get a copy of libc.so with debug symbols, and load that symbol table.  You don't have to replace the library itself to do that.
>> 
>> 	paul
> 
> I know, thanks; but the host is Solaris, and Oracle doesn't appear to provide this (although I'm pursuing it with them.).  I could also build the OpenSolaris libc and hope they're close enough.  However, it really seems as if one ought to be able to do what I described.
> 
> - Richard
> 
>> On Apr 29, 2011, at 2:36 PM, Richard Silverman wrote:
>> 
>>> Hello,
>>> 
>>> This seems as if it should be simple, but I can't find an answer.  I would like to teach gdb about new types relevant to the program being debugged, which are not among the debugging info in the program.  A concrete example: I have a program which uses pthreads from libc.  It calls:
>>> 
>>>      int pthread_cond_wait(pthread_cond_t *restrict cond,
>>>          pthread_mutex_t *restrict mutex);
>>> 
>>> ... and the argument types are defined in system header files.  But libc.so has no debugging info, so gdb doesn't know about these types, and can't interpret the arguments for me.  How can I teach gdb about these types?
>>> 
>>> Thanks,
>>> 
>>> - Richard
>> 
>> 
>> 


  reply	other threads:[~2011-04-29 20:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29 18:36 Richard Silverman
2011-04-29 18:57 ` Paul Koning
2011-04-29 20:43   ` Richard Silverman
2011-04-29 20:53     ` Paul Koning [this message]
2011-04-30  3:02       ` Richard Silverman
2011-05-10 23:42         ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0CC3B1C2-DD9F-4A4A-AA07-9E2FC72D6C9D@dell.com \
    --to=paul_koning@dell.com \
    --cc=gdb@sourceware.org \
    --cc=res@qoxp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox