From: Joel Brobecker <brobecker@adacore.com>
To: Michael Eager <eager@eagerm.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] PowerPC 32 with Secure PLT
Date: Wed, 18 Jan 2012 12:18:00 -0000 [thread overview]
Message-ID: <20120118120831.GB31383@adacore.com> (raw)
In-Reply-To: <4F163E35.1080505@eagerm.com>
> 2012-01-17 Michael Eager <eager@eagercon.com>
>
> * configure.tgt (powerpc-*-linux*): Add glibc-tdep.o.
> * ppc-linux-tdep.c: Include glibc-tdep.h.
> (powerpc32_plt_stub, powerpc32_plt_stub_so): Add PLT stub templates.
> (powerpc_linux_in_plt_stub): New function.
> (powerpc_linux_in_dynsym_resolve_code): New function.
> (ppc_skip_trampoline_code): New function.
> (ppc_linux_init_abi): Use PPC specific functions rather than generic.
> Use glibc_skip_solib_resolver.
Overall, this looks good to me, but I am not a Linux specialist,
so please give it another week before checking in to give the other
maintainers a chance to comment as well.
Below are some comments.
> +#define POWERPC32_PLT_STUB_LEN \
> + (sizeof powerpc32_plt_stub / sizeof (powerpc32_plt_stub[0]))
There is a macro, ARRAY_SIZE, that does this for you.
> +/* Check if PC is in PLT stub. For non-secure PLT, stub is in .plt
Trailing space at the end of this line...
> +/* Follow PLT stub to actual routine. */
> +
> +static CORE_ADDR
> +ppc_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
There are several lines in the code and the comments of this funtion
that have trailing spaces. Can you get rid of them?
Also, several lines are too long. The absolute limit is 80 characters,
but the recommended limit is 70 characters. Can you reformat some of
the lines where it doesn't make the code uglier?
> + target = (CORE_ADDR) read_memory_unsigned_integer (target, 4, byte_order);
This is an area where I am not sure, but I think it would be better
to use read_memory_typed_address. I think the address type that you
want is: builtin_type (gdbarch)->builtin_func_ptr.
Same below.
--
Joel
next prev parent reply other threads:[~2012-01-18 12:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 4:00 Michael Eager
2012-01-18 12:18 ` Joel Brobecker [this message]
2012-01-18 16:37 ` Michael Eager
2012-01-18 16:45 ` Michael Eager
2012-01-18 17:03 ` Joel Brobecker
2012-01-18 18:23 ` Michael Eager
-- strict thread matches above, loose matches on Subject: below --
2012-01-18 3:36 Michael Eager
2012-01-25 0:37 ` Michael Eager
2012-01-25 1:12 ` Ryan Arnold
2012-01-25 1:55 ` Michael Eager
2012-01-30 17:19 ` Michael Eager
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=20120118120831.GB31383@adacore.com \
--to=brobecker@adacore.com \
--cc=eager@eagerm.com \
--cc=gdb-patches@sourceware.org \
/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