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 Sep 7, 2011, at 3:09 PM, 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.
> 
> This leaves out attaching to already running programs.  We support PIE on
> linux/svr4 now.

Correct.  But handling attached PIE processes is a different problem.


>  Would it be hard to impossible to support it on Lion?

No, it isn't impossible.  It is just more difficult than PIE executables.

>> 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?

Sure.

Tristan.


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