This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] PR/9723: gdb breakpoints silently fail on PIE binaries


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]