This is the mail archive of the
mailing list for the GDB project.
Re: [patch] core: use core_pid
- From: Daniel Jacobowitz <drow at false dot org>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 10 Apr 2008 10:02:20 -0400
- Subject: Re: [patch] core: use core_pid
- References: <47C46A96.firstname.lastname@example.org> <20080226194502.GA1523@caradoc.them.org> <47C46E0F.email@example.com>
On Tue, Feb 26, 2008 at 02:52:47PM -0500, Aleksandar Ristovski wrote:
> Daniel Jacobowitz wrote:
>> On Tue, Feb 26, 2008 at 02:37:58PM -0500, Aleksandar Ristovski wrote:
>>> + gdb_assert (abfd != NULL && elf_tdata (abfd) != NULL);
>> What if it's not an ELF core file?
> Didn't think about that (our core can only be ELF).
> In that case, do you think something like this would work?
Not quite. I recommend you take a look at bfd/elf.c and
bfd/elf64-x86-64.c to see some different ways ".reg/XXXX" sections are
created. For QNX, you get .reg/TID. But for other targets you get
(LWPID << 16) + PID and core_pid is updated as we go along.
It looks like the information GDB needs doesn't make it out of BFD.