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] Make "run" work on macOS 10.13


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> {
>> +  /* Starting with Sierra, SIP prevents gdb from attaching to the
>> +     shell, so users have to disable startup-with-shell.  */
>> +  scoped_restore save_startup
>> +    = make_scoped_restore (&startup_with_shell, 0);
>> +
>> /* Do the hard work.  */
>> fork_inferior (exec_file, allargs, env, darwin_ptrace_me,

Simon> I think this part is good.  I would suggest printing a
Simon> message/warnings to indicate that we are disabling startup-with-shell
Simon> (only if startup_with_shell is 1 in the first place).

See the bug and also Pedro's comments on Xavier's similar patch --
there are other, probably better, ideas here.

Simon> The unrelocated value of the symbol is 0xf782.  That breakpoint is
Simon> used for "set stop-on-solib-events", it seems, so I tried to enable
Simon> that with both of your patches.  I got a stop with Xavier's patch and
Simon> none with Tom's, which leads me to think that Xavier's patch gets it
Simon> right.  I think you may be using the executable base address, while we
Simon> actually want to use dyld's base address?  This is not very clear to
Simon> me yet.

I think we want Xavier's patch and not mine.  Mine was more of a stab in
the dark.

Tom


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