[RFC] PR/9723: gdb breakpoints silently fail on PIE binaries
Paul Pluzhnikov
ppluzhnikov@google.com
Tue Jul 28 01:42:00 GMT 2009
On Mon, Jul 27, 2009 at 4:21 PM, Thiago Jung
Bauermann<thiago.bauermann@gmail.com> wrote:
+ if (fread (&elfhdr32, sizeof (elfhdr32), 1, fp) != 1)
+ error (_("blah"));
Probably a more informative error is called for here :-)
+ is_pie = (*((uint16_t *) elfhdr32.e_type) == ET_DYN)? 1 : 0;
Wouldn't this fail when host and target have different byte order?
I think you may need to call elf_swap_ehdr_in here.
Cheers,
--
Paul Pluzhnikov
More information about the Gdb-patches
mailing list