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] Support of Lion (darwin 11)


On Wednesday 07 September 2011 14:09:06, Pedro Alves wrote:
> On Wednesday 07 September 2011 13:28:41, Tristan Gingold wrote:
> > Hi,
> > 
> > with the latest mac OS X, executables are now pie by default and their load address is random.  This obviously needs to be considered by gdb, and the easiest method is to disable the randomization.

I should add that being able to disable the randomization on its own is
an acceptable patch.  There's "set disable-randomization" on linux native
already to do the same thing, and it disables randomization by default.
You could re-use the same user visible setting.  It just so happens
that you'd get Lion half working for free.  :-)

> 
> This leaves out attaching to already running programs.  We support PIE on
> linux/svr4 now.  Would it be hard to impossible to support it on Lion?
> 
> > I also did some cleanup in this function:  use alloca instead of xmalloc for argv to avoid a memory leak, and moved the code that allocate shell_command within the if (shell) block.  I also factorized the gdb_flush/_exit code used in case on error.
> 
> How about splitting these out into a separate, preparatory patch?
> 
> 

-- 
Pedro Alves


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