From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: sangamesh.swamy@in.ibm.com (Sangamesh Mallayya)
Cc: kevinb@redhat.com (Kevin Buettner), gdb-patches@sourceware.org
Subject: Re: [PATCH] Adding support for reding signal handler frame in AIX
Date: Tue, 30 Oct 2018 10:20:00 -0000 [thread overview]
Message-ID: <20181030102012.8A37BD802EF@oc3748833570.ibm.com> (raw)
In-Reply-To: <OF16846FC6.4A0E2CCE-ON65258336.002671AD-65258336.0027F2EB@notes.na.collabserv.com> from "Sangamesh Mallayya" at Oct 30, 2018 07:16:21 AM
Sangamesh Mallayya wrote:
> I have modified the patch and implemented it using the trad frame cache.
> Please review and let me know the comments.
This version now looks pretty good to me, I just have a few minor comments
related to coding style. Once those are addresses, it should be ready to
commit.
> + sigconext structure have the mstsave saved under the
Typo "sigcontext" ?
> + if (wordsize == 4) {
> + func = read_memory_unsigned_integer (base_orig +
> + SIG_FRAME_PC_OFFSET + 8,
> + tdep->wordsize, byte_order);
> + safe_read_memory_integer (base_orig + SIG_FRAME_FP_OFFSET + 8,
> + wordsize, byte_order, &backchain);
> + base = (CORE_ADDR)backchain;
> + } else {
> + func = read_memory_unsigned_integer (base_orig +
> + SIG_FRAME_LR_OFFSET64,
> + tdep->wordsize, byte_order);
> + safe_read_memory_integer (base_orig + SIG_FRAME_FP_OFFSET64,
> + wordsize, byte_order, &backchain);
> + base = (CORE_ADDR)backchain;
> + }
GNU coding style is to put braces on separate lines, and indent like so
if (wordsize == 4)
{
func = ...
}
else
{
func = ...
}
Also, why do you use tdep->wordsize in some places and wordsize in others?
> + if (wordsize == 4) {
> + trad_frame_set_reg_addr (this_trad_cache, tdep->ppc_lr_regnum,
> + base_orig + 0x38 + 52 + 8);
> + } else {
> + trad_frame_set_reg_addr (this_trad_cache, tdep->ppc_lr_regnum,
> + base_orig + 0x70 + 320);
> + }
Where there is just a single line inside the if / else block, you
should just omit the braces completely.
> * gdb.base/aix-sighandle_test.c: New file.
> * gdb.base/aix-sighandle_test.exp: New file.
Those should best go in gdb.arch, not in gdb.base (since they are
specific to a single platform). Also, it may be better to omit
the "_test" part of the file names (all files in these directories
are tests!).
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2018-10-30 10:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 5:54 Sangamesh Mallayya
2018-09-04 23:18 ` Kevin Buettner
2018-09-10 6:32 ` Sangamesh Mallayya
2018-09-10 17:34 ` Kevin Buettner
2018-09-12 13:53 ` Ulrich Weigand
2018-09-27 8:33 ` Sangamesh Mallayya
[not found] ` <OF4C5ED06A.3C846B3C-ON65258315.002EABF7-65258315.002F01D3@LocalDomain>
2018-10-30 7:16 ` Sangamesh Mallayya
2018-10-30 10:20 ` Ulrich Weigand [this message]
2018-10-31 10:18 ` Sangamesh Mallayya
2018-10-31 10:37 ` 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=20181030102012.8A37BD802EF@oc3748833570.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=sangamesh.swamy@in.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