From: Tom Tromey <tom@tromey.com>
To: Kamil Rytarowski <n54@gmx.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Correct decoding AUXV on NetBSD
Date: Mon, 16 Mar 2020 07:25:40 -0600 [thread overview]
Message-ID: <8736a88m97.fsf@tromey.com> (raw)
In-Reply-To: <20200314182258.4277-1-n54@gmx.com> (Kamil Rytarowski's message of "Sat, 14 Mar 2020 19:22:58 +0100")
>>>>> "Kamil" == Kamil Rytarowski <n54@gmx.com> writes:
Kamil> The type field is always 32bit. The value field reflects the size of
Kamil> the register/pointer.
Kamil> gdb/ChangeLog:
Kamil> * auxv.c (default_auxv_parse): Add new variable sizeof_auxv_type
Kamil> and use it in extract_unsigned_integer().
Kamil> +#ifdef __NetBSD__
Kamil> + const int sizeof_auxv_type = sizeof(int32_t);
Kamil> +#else
Kamil> + const int sizeof_auxv_type = sizeof_auxv_field;
Kamil> +#endif
IIUC, sizeof_auxv_type describes a property of the target. That means
this approach is incorrect, because it will only work for native
debugging, and will do the wrong thing in other cases.
If default_auxv_parse is incorrect for NetBSD, another way is to
override it in the appropriate gdbarch. See target_auxv_parse. OpenBSD
appears to do this, see obsd_auxv_parse.
Tom
next prev parent reply other threads:[~2020-03-16 13:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 18:22 Kamil Rytarowski
2020-03-16 13:25 ` Tom Tromey [this message]
2020-03-16 18:17 ` Kamil Rytarowski
2020-03-16 18:17 ` [PATCH v2] Add support for "info auxv" " Kamil Rytarowski
2020-03-19 13:11 ` Kamil Rytarowski
2020-03-20 15:43 ` Tom Tromey
2020-03-20 17:27 ` Kamil Rytarowski
2020-03-20 17:27 ` [PATCH v3] " Kamil Rytarowski
2020-03-26 23:26 ` Kamil Rytarowski
2020-03-27 16:31 ` John Baldwin
2020-03-27 17:04 ` Kamil Rytarowski
2020-03-27 19:22 ` John Baldwin
2020-03-29 20:35 ` Kamil Rytarowski
2020-03-29 22:10 ` 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=8736a88m97.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=n54@gmx.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).