From: Joel Brobecker <brobecker@adacore.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH/arm] Backtrace through exception frames on arm/cortex-m target
Date: Wed, 14 Nov 2012 02:57:00 -0000 [thread overview]
Message-ID: <20121114025724.GC5103@adacore.com> (raw)
In-Reply-To: <50A30070.2030700@codesourcery.com>
> Sure. We didn't add comments to these functions because they are
> installed to 'struct frame_unwind' to compose a unwinder for a specific
> type of frames. The situation is similar to gdbarch hook functions, so
> I add comment in the similar way, for example,
Thank you. I know the comment is slightly superfluous, but a comment
like the one you added is good to confirm what it's for, and where
to go looking for the function's general documentation. And one of
the reasons why I usually insist on documenting every function is
because it is just simpler to say "document everything" than to say
"document everything except ...".
> 2012-11-14 Daniel Jacobowitz <dan@codesourcery.com>
> Yao Qi <yao@codesourcery.com>
>
> * arm-tdep.c (arm_addr_bits_remove): Do not adjust the low
> bit of EXC_RETURN.
> (arm_m_exception_cache, arm_m_exception_this_id)
> (arm_m_exception_prev_register, arm_m_exception_unwind_sniffer)
> (arm_m_exception_unwind): New.
> (arm_gdbarch_init): Register arm_m_exception_unwind.
The patch looks fine to me, except for one minor formatting nit.
Pre-appoved with that change.
Also, a small reminder that the soft limit for line length is 70
chars, with a hard limit of 80 per an earlier discussion on this list.
Some of the comments are a little wide, in that respect, but nothing
significant enough to worry about. Just something to keep in mind
for the future, if you don't mind.
> + /* On M-profile devices, do not strip the low bit from EXC_RETURN
> + (the magic exception return address). */
Question from an arm novice: Why? (and would it be something useful
to add to the comment as well?
> +struct frame_unwind arm_m_exception_unwind = {
Can you put the opening curly brace on the next line? We're a little
inconsistent regarding this, but I believe that this is the style
that we should be using.
Thanks,
--
Joel
next prev parent reply other threads:[~2012-11-14 2:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 14:16 Yao Qi
2012-11-13 14:27 ` Mark Kettenis
2012-11-13 14:44 ` Yao Qi
2012-11-13 15:12 ` Mark Kettenis
2012-11-13 15:50 ` Joel Brobecker
2012-11-14 2:23 ` Yao Qi
2012-11-14 2:57 ` Joel Brobecker [this message]
2012-11-14 3:48 ` Yao Qi
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=20121114025724.GC5103@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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