This is the mail archive of the 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: [patch] Relocate phdr in read_program_header

On Mon, 17 Oct 2011 18:26:28 +0200, Aleksandar Ristovski wrote:
> I was contemplating a testcase but I couldn't think of a trick to
> "make" gdb not find the executable... Thanks for the test.

The testcase of mine has a problem it will stop working in future.
	[patch] Attach to running but deleted executable

The problem is the patch above is not so useful as it still does not work for
deleted libraries, there was discussed some Linux kernel support like
/proc/PID/mappedfileshandlesdirectory/ but it probably has not happened yet.

Anyway one could also use gdbserver - which is probably the case your fix
targets IIUC, the testcase will regress with a fix like above.

> <date>  Aleksandar Ristovski  <>
>         * solib-svr4.c (read_program_header): New variable pt_phdr,
> initialize
>         it from target PT_PHDR p_vaddr, relocate sect_addr by it.

There should be now two new variables pt_phdr and pt_phdr_p. :-)

OK with that ChangeLog change in a single commit with my testcase.


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