* DWARF for arm-wince-pe.
@ 2006-07-27 0:42 Pedro Alves
2006-07-27 0:45 ` Jim Blandy
2006-07-27 9:01 ` Jim Blandy
0 siblings, 2 replies; 4+ messages in thread
From: Pedro Alves @ 2006-07-27 0:42 UTC (permalink / raw)
To: gdb
Hi,
I'm trying to add dwarf support for arm-wince-pe. I have implemented the
binutils and the gcc part.
I am now looking into gdb support.
Gdb is issuing this internan-error:
"/cygdrive/d/cegcc/trunk/cegcc/src/gdb-cvs/gdb/dwarf2read.c:1293:
internal-error: read_comp_unit_head: dwarf from non elf file
A problem internal to GDB has been detected,
further debugging may prove unreliable."
Looking at warf2read.c:read_comp_unit_head around line 1293, I see:
signed_addr = bfd_get_sign_extend_vma (abfd);
if (signed_addr < 0)
internal_error (__FILE__, __LINE__,
_("read_comp_unit_head: dwarf from non elf file"));
I'm trying to find out what cygwin does to support dwarf 2 on coff, and
do the same, but my limited knowledge of gdb internals is not helping
here.
Can anyone please give me a pointer at where should I be looking at to
fix this?
Cheers,
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: DWARF for arm-wince-pe.
2006-07-27 0:42 DWARF for arm-wince-pe Pedro Alves
@ 2006-07-27 0:45 ` Jim Blandy
2006-07-27 9:01 ` Jim Blandy
1 sibling, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2006-07-27 0:45 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb
Pedro Alves <pedro_alves@portugalmail.pt> writes:
> I'm trying to add dwarf support for arm-wince-pe. I have implemented the
> binutils and the gcc part.
> I am now looking into gdb support.
>
> Gdb is issuing this internan-error:
>
> "/cygdrive/d/cegcc/trunk/cegcc/src/gdb-cvs/gdb/dwarf2read.c:1293:
> internal-error: read_comp_unit_head: dwarf from non elf file
> A problem internal to GDB has been detected,
> further debugging may prove unreliable."
Hmm. I was almost sure we had DWARF PE support going. Which version
of GDB are you using? Have you tried the current CVS sources?
http://sourceware.org/gdb/current/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DWARF for arm-wince-pe.
2006-07-27 0:42 DWARF for arm-wince-pe Pedro Alves
2006-07-27 0:45 ` Jim Blandy
@ 2006-07-27 9:01 ` Jim Blandy
2006-07-27 11:37 ` Pedro Alves
1 sibling, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2006-07-27 9:01 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb
Hi, Pedro. I looked into this a little further. I think you just
need to extend this function in bfd/bfd.c appropriately:
int
bfd_get_sign_extend_vma (bfd *abfd)
{
char *name;
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
return get_elf_backend_data (abfd)->sign_extend_vma;
name = bfd_get_target (abfd);
/* Return a proper value for DJGPP & PE COFF (x86 COFF variants).
This function is required for DWARF2 support, but there is
no place to store this information in the COFF back end.
Should enough other COFF targets add support for DWARF2,
a place will have to be found. Until then, this hack will do. */
if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0
|| strcmp (name, "pe-i386") == 0
|| strcmp (name, "pei-i386") == 0)
return 1;
bfd_set_error (bfd_error_wrong_format);
return -1;
}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: DWARF for arm-wince-pe.
2006-07-27 9:01 ` Jim Blandy
@ 2006-07-27 11:37 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2006-07-27 11:37 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb
Jim Blandy wrote:
> Hi, Pedro. I looked into this a little further. I think you just
> need to extend this function in bfd/bfd.c appropriately:
>
> int
> bfd_get_sign_extend_vma (bfd *abfd)
> {
> char *name;
>
> if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
> return get_elf_backend_data (abfd)->sign_extend_vma;
>
> name = bfd_get_target (abfd);
>
> /* Return a proper value for DJGPP & PE COFF (x86 COFF variants).
> This function is required for DWARF2 support, but there is
> no place to store this information in the COFF back end.
> Should enough other COFF targets add support for DWARF2,
> a place will have to be found. Until then, this hack will do. */
> if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0
> || strcmp (name, "pe-i386") == 0
> || strcmp (name, "pei-i386") == 0)
> return 1;
>
> bfd_set_error (bfd_error_wrong_format);
> return -1;
> }
>
>
Gasp, it was so easy. I looked everywhere else but where I should have.
Since bfd_get_sign_extend_vma only works for elf, I didn't look
inside...
Thank you.
Cheers,
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-27 9:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27 0:42 DWARF for arm-wince-pe Pedro Alves
2006-07-27 0:45 ` Jim Blandy
2006-07-27 9:01 ` Jim Blandy
2006-07-27 11:37 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox