[patch] core: use core_pid

Daniel Jacobowitz drow@false.org
Thu Apr 10 15:16:00 GMT 2008


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.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list