Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFC] Make "run" work on macOS 10.13
Date: Sat, 30 Jun 2018 17:41:00 -0000	[thread overview]
Message-ID: <e2aaeb81-586a-9d45-7e70-1be66368c780@redhat.com> (raw)
In-Reply-To: <20180629205532.25377-1-tom@tromey.com>

On 06/29/2018 09:55 PM, Tom Tromey wrote:
> I would like some feedback on this patch.
> 
> On macOS 10.13.5, "run" does not work in gdb.  There are two cases:
> 
> 1. If I forget to "set startup-with-shell off", then gdb will fail due
>    to the system integrity protection feature.  I believe this happens
>    because gdb is not allowed to debug the shell.
> 
>    You can find many sites advocating "set startup-with-shell off",
>    but it seems to me that it is friendlier for gdb to simply do it by
>    default.

Judging from stackoverflow, input redirection is a common-ish thing
for users to do.  Maybe we could reuse Eli's input redirection
emulation for Windows here:

 https://sourceware.org/ml/gdb-patches/2016-10/msg00832.html

Doesn't have to be you or in this patch of course.  Just a suggestion.

> 
>    One option here might be to do this conditionally based on the
>    version of the OS.
> 
> 2. I found that gdb was setting the solib breakpoint incorrectly,
>    causing a failure.  Adding the load address to the notifier address
>    makes this work for me.  I suspect this would regress earlier
>    versions of macOS, but I have no way to test that; one idea might
>    be to only do this when gdb_dyld_all_image_infos::version == 15.

14 vs 15 behaving differently does sound consistent with:

  https://sourceware.org/ml/gdb-patches/2018-06/msg00167.html

Thanks,
Pedro Alves


  parent reply	other threads:[~2018-06-30 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 20:55 Tom Tromey
2018-06-29 21:01 ` Tom Tromey
2018-06-29 23:04 ` Joel Brobecker
2018-06-30 17:41 ` Pedro Alves [this message]
2018-08-23 16:01 ` Simon Marchi
2018-08-23 20:04   ` Tom Tromey
2018-08-23 20:42     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2aaeb81-586a-9d45-7e70-1be66368c780@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox