From: Eli Zaretskii <eliz@gnu.org>
To: Markus Deuling <deuling@de.ibm.com>
Cc: gdb-patches@sourceware.org, uweigand@de.ibm.com
Subject: Re: [rfc] Replace macros by gdbarch functions in gdbint manual
Date: Sat, 23 Jun 2007 08:05:00 -0000 [thread overview]
Message-ID: <uodj7p04s.fsf@gnu.org> (raw)
In-Reply-To: <467B7557.9000708@de.ibm.com> (message from Markus Deuling on Fri, 22 Jun 2007 09:08:07 +0200)
> Date: Fri, 22 Jun 2007 09:08:07 +0200
> From: Markus Deuling <deuling@de.ibm.com>
> CC: gdb-patches@sourceware.org, uweigand@de.ibm.com
>
> thank you for your review. I reworked the patch and think I addressed all of your points.
Thanks. Unfortunately, this is not yet done, see below. I apologize
if I failed to make some of these comments the first time you posted
your original patch: it's not easy to see minor problems in such a
large patch.
> The section "Converting an existing Target Architecture to Multi-arch" seems to be obsolete?
I don't know enough about this. Daniel, could you comment, please?
> -address of the instruction. ADDR_BITS_REMOVE should filter out these
> +address of the instruction. gdbarch_addr_bits_remove should filter out these
> bits with an expression such as @code{((addr) & ~3)}.
gdbarch_addr_bits_remove should be in @code, as it is a C symbol.
(Yes, I know: the original text had that mistake as well.)
> -@item CANNOT_FETCH_REGISTER (@var{regno})
> -@findex CANNOT_FETCH_REGISTER
> +@item int gdbarch_cannot_fetch_register (@var{gdbarch}, @var{regum})
> +@findex gdbarch_cannot_fetch_register
> A C expression that should be nonzero if @var{regno} cannot be fetched
> from an inferior process. This is only relevant if
> @code{FETCH_INFERIOR_REGISTERS} is not defined.
gdbarch_cannot_fetch_register is a function now, so it sounds like
saying it's ``a C expression'' would be a mistake. A macro can be an
expression, but a function cannot.
There are other similar wording problems; search for "C expression".
> +stack top) stack address @var{rhs}. Let the function return @code{lhs < rhs}
^^^
Two spaces after a period that ends a sentence, please (here and
elsewhere).
> +@item int gdbarch_in_solib_return_trampoline (@var{gdbarch}, @var{pc}, @var{name})
> +@findex gdbarch_in_solib_return_trampoline
> +Declare this function to evaluate to nonzero if the program is stopped in the
> trampoline that returns from a shared library.
You repeatedly use "declare a function" where the previous text said
"define a macro". I don't think that the use of ``declare'' here is
correct: a declaration of a function is its prototype; you really want
to say "define a function", which in C parlance means write the
function's implementation.
> +Return the name of register @var{regnr} as a string. May return @code{NULL}
> +to indicate that register @var{regnr} is not valid.
A minor stylistic point: "indicate that @var{regnr} is not a valid
register" sounds better.
> -@item SKIP_PERMANENT_BREAKPOINT
> -@findex SKIP_PERMANENT_BREAKPOINT
> +@item void gdbarch_skip_permanent_breakpoint (@var{gdbarch}, @var{regcache})
> +@findex gdbarch_skip_permanent_breakpoint
> Advance the inferior's PC past a permanent breakpoint. @value{GDBN} normally
> steps over a breakpoint by removing it, stepping one instruction, and
> re-inserting the breakpoint. However, permanent breakpoints are
> hardwired into the inferior, and can't be removed, so this strategy
> -doesn't work. Calling @code{SKIP_PERMANENT_BREAKPOINT} adjusts the processor's
> -state so that execution will resume just after the breakpoint. This
> -macro does the right thing even when the breakpoint is in the delay slot
> +doesn't work. Calling @code{gdbarch_skip_permanent_breakpoint} adjusts the
> +processor's state so that execution will resume just after the breakpoint.
> +This macro does the right thing even when the breakpoint is in the delay slot
^^^^^^^^^^
But this isn't a macro anymore, is it?
> +@findex gdbarch_skip_trampoline_code
> If the target machine has trampoline code that sits between callers and
> -the functions being called, then define this macro to return a new PC
> +the functions being called, then set this function to return a new PC
> that is at the start of the real function.
"set this function" again.
next prev parent reply other threads:[~2007-06-23 8:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-20 10:19 Markus Deuling
2007-06-20 18:32 ` Eli Zaretskii
2007-06-22 7:10 ` Markus Deuling
2007-06-23 8:05 ` Eli Zaretskii [this message]
2007-06-23 12:29 ` Daniel Jacobowitz
2007-06-26 17:36 ` Markus Deuling
2007-06-27 18:35 ` Eli Zaretskii
2007-06-28 3:10 ` Daniel Jacobowitz
2007-06-28 4:53 ` Eli Zaretskii
2007-06-28 10:46 ` Markus Deuling
2007-06-29 18:33 ` Eli Zaretskii
2007-06-28 21:01 ` Jim Blandy
2007-06-29 17:46 ` Eli Zaretskii
[not found] <4688B47B.1000301@de.ibm.com>
2007-07-03 12:23 ` Ulrich Weigand
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=uodj7p04s.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=deuling@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.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