public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Takis Psarogiannakopoulos <takis@XFree86.Org>
To: kevinb@redhat.com
Cc: gdb@sources.redhat.com, binutils@sources.redhat.com
Subject: RE:Re: GDB 5.1/Core files and ptids
Date: Thu, 17 Jan 2002 08:08:00 -0000	[thread overview]
Message-ID: <Pine.BSF.4.21.0201170558370.56056-100000@public.xfree86.org> (raw)



Hi Kevin,

On Wed, 16 Jan 2002, Kevin Buettner wrote:

> The context here is that we're trying to fetch the appropriate
> .reg (.reg2, etc) section from bfd, right?

That is correct. We are trying to get a section with name "name".

> > Especially when, even in the new gdb-5.1/bfd we find:
> > 
> > ======
> > static int
> > elfcore_make_pid (abfd)
> >      bfd *abfd;
> > {
> >   return ((elf_tdata (abfd)->core_lwpid << 16)
> >           + (elf_tdata (abfd)->core_pid));
> > }
> > =======
> 
> This will need to change.  It is incorrect to attempt to represent
> both the pid and lwp as a single integer whose size isn't large
> enough to hold all of the bits.
>   

I have no problem with the ptid especially when it is less confusing
from the old mixed pid's! 
My problem is that a core DG/UX file has lot of info sections that 
I would like to read and wasnt sure if gdb would be able now taking 
in account that elfcore_make_pid had the above form.

>     So, to fetch a .reg section in a multithreaded core dump where
>     the pid is 14 and the lwp is 42, GDB would need to ask BFD for
>     the .reg/14+42 (pseudo) section.


>      
>       else if (TIDGET (inferior_ptid))
>       sprintf (section_name, "%s/%d+%d", name, PIDGET (inferior_ptid),
>                TIDGET (inferior_ptid));
>       else if (PIDGET (inferior_ptid))
>       sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid));
>       else
>       strcpy (section_name, name);  
>        


OK. That is indeed a solution to what I was saying about reading sections
using ptid's. Thanks Kevin.

Regards,
Takis




             reply	other threads:[~2002-01-17 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-17  8:08 Takis Psarogiannakopoulos [this message]
2002-01-18 15:04 ` Andrew Cagney

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=Pine.BSF.4.21.0201170558370.56056-100000@public.xfree86.org \
    --to=takis@xfree86.org \
    --cc=binutils@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).