From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Cc: tom@tromey.com
Subject: Re: [PATCH 2/2] darwin: Don't use sbrk
Date: Wed, 04 Jul 2018 10:49:00 -0000 [thread overview]
Message-ID: <9b0d4749-f2cf-647c-cccf-a8a8ab4e982b@redhat.com> (raw)
In-Reply-To: <20180704043033.29212-2-simon.marchi@polymtl.ca>
On 07/04/2018 05:30 AM, Simon Marchi wrote:
> This patch gets rid of this warning on macOS:
>
> sbrk on macOS is not useful for our purposes, since sbrk(0) always
> returns the same value. From what I read, brk/sbrk on macOS is just an
> emulation, it always returns a pointer in a 4MB section reserved for
> that.
>
> --- a/gdb/common/common-defs.h
> +++ b/gdb/common/common-defs.h
> @@ -105,4 +105,8 @@
> /* String containing the current directory (what getwd would return). */
> extern char *current_directory;
>
Suggest adding a comment here based on what you had in the intro:
/* sbrk on macOS is not useful for our purposes, since sbrk(0) always
returns the same value. brk/sbrk on macOS is just an emulation
that always returns a pointer to a 4MB section reserved for
that. */
> +#if defined (HAVE_SBRK) && !__APPLE__
> +#define HAVE_USEFUL_SBRK 1
> +#endif
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-07-04 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 4:31 [PATCH 1/2] darwin: Silence syscall deprecated declaration warning Simon Marchi
2018-07-04 4:31 ` [PATCH 2/2] darwin: Don't use sbrk Simon Marchi
2018-07-04 10:49 ` Pedro Alves [this message]
2018-07-04 16:41 ` Simon Marchi
2018-07-04 10:31 ` [PATCH 1/2] darwin: Silence syscall deprecated declaration warning Pedro Alves
2018-07-04 16:39 ` Simon Marchi
2018-07-05 16:12 ` Pedro Alves
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=9b0d4749-f2cf-647c-cccf-a8a8ab4e982b@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).