Re: gdb and PIE binaries

2017-12-10 Thread Samuel Thibault
Hello, Roland McGrath, on ven. 11 nov. 2016 14:57:21 -0800, wrote: > On the Hurd, we don't really have auxv at all. But to simplify things > with GDB, we could have our core dumps include an NT_AUXV containing > just an AT_ENTRY value synthesized by other means. Off hand I don't > recall anythin

Re: gdb and PIE binaries

2016-11-22 Thread Samuel Thibault
Brent W. Baccala, on Tue 22 Nov 2016 16:06:18 -1000, wrote: > The Debian /usr/bin/ > gdb, though, is not PIE, which makes me wonder if someone (Samuel?) is > compiling our Debian packages without PIE, to avoid this problem. PIE has been systematically been enabled in Debian only recently. And then

Re: gdb and PIE binaries

2016-11-22 Thread Brent W. Baccala
On Fri, Nov 11, 2016 at 7:17 AM, Samuel Thibault wrote: > Hello, > > Debian is pushing more and more PIE builds, so that address > randomization can be done. However, on GNU/Hurd, gdb can't work with > core files from processes running PIE programs, so one has to pass > CFLAGS=-no-pie etc. to be

Re: gdb and PIE binaries

2016-11-11 Thread Roland McGrath
AFAIK gdb does not use fancy information like file-mapping stuff. NT_FILE is probably hard to support on the Hurd, since we don't have a way to go backwards from a memory object port to a file (let alone a file name). All GDB needs is to know where the PIE was loaded, so it can find the DT_DEBUG a

Re: gdb and PIE binaries

2016-11-11 Thread Samuel Thibault
Samuel Thibault, on Fri 11 Nov 2016 18:17:43 +0100, wrote: > AIUI, what gdb misses is simply the name of the files being mapped: > since the mappings may be random, it can't invent the file names. I forgot to mention: on Linux, its provided in the core file through an NT_FILE note. Samuel