Subject: Re: gdb and dlopen()
To: None <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 08/27/2002 15:27:48
> In 1999 when I was using Linux, gdb could give backtraces into dlopen()ed
> code, but it could not set breakpoints in it. I don't think it could step
> into it either, but I am not sure.
Both are normally done by writing to the code segment.
If it is mapped shared then you are in trouble!
OTOH dlopen() seems to to:
685 mozilla-bin CALL mmap( 0,0x5000,0x5, 0x2,0xc,0,0)
PROT_READ | PROT_EXEC, MAP_PRIVATE
685 mozilla-bin RET mmap 1216962560/0x48896000
685 mozilla-bin CALL mmap(0x4889a000,0x1000,0x3, 0x12,0xc,0,0x3000)
PROT_WRITE | PROT_READ, MAP_FIXED | MAP_PRIVATE
685 mozilla-bin RET mmap 1216978944/0x4889a000
685 mozilla-bin CALL mmap(0x4889b000, 0,0x3,0x1012,0xffffffff,0,0)
PROT_WRITE | PROT_READ, MAP_ANON | MAP_FIXED | MAP_PRIVATE
685 mozilla-bin RET mmap 1216983040/0x4889b000
So nothing is actually shared (just cow).
why does in bother mapping in the zero length bss?
David Laight: firstname.lastname@example.org