From: Mike Frysinger <vapier@gentoo.org>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 4/8] New port: TI C6x: Read loadmap from gdbserver
Date: Fri, 22 Jul 2011 12:22:00 -0000 [thread overview]
Message-ID: <CAJaTeTo6Yzqjq=L1=fXvgQmJb+UZNtsfRQtXyHY580YNTTZBFg@mail.gmail.com> (raw)
In-Reply-To: <4E263865.2070100@codesourcery.com>
On Tue, Jul 19, 2011 at 22:07, Yao Qi wrote:
> +#if defined __DSBT__
> +static int
rather than being tied to the exec format that *gdbserver* is being
built as, shouldnt this be bound to the ptrace defines being available
? how abut using "#ifdef PTRACE_GETDSBT" ?
> +linux_read_loadmap (const char *annex, CORE_ADDR offset,
> + unsigned char *myaddr, unsigned int len)
indentation looks wrong wrt GNU style. needs tabs and spaces to
properly align it.
> + int addr = (strcmp (annex, "exec") == 0 ? (int) PTRACE_GETDSBT_EXEC :
> + (strcmp (annex, "interp") == 0 ? (int) PTRACE_GETDSBT_INTERP :
> + -1));
> ...
> + if (addr == -1)
> + return -1;
style with add init is off here too. but seems like it'd be cleaner
to have this be a series of if statements incorporated into the -1
check to make the -1 value unnecessary.
> + copy_length = actual_length - offset < len ? actual_length - offset : len;
does gdb really not have min/max helpers ?
> + ptrace (PTRACE_GETDSBT, pid, addr, &data);
what if it fails ?
> + {"fdpic", handle_qxfer_fdpic}
style is broken. needs space after "{", space before "}", and comma after "}"
> + /* Load maps for FDPIC systems. */
> + TARGET_OBJECT_FDPIC
i think this needs a trailing comma
-mike
next prev parent reply other threads:[~2011-07-22 2:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 2:09 Yao Qi
2011-07-20 14:32 ` Tom Tromey
2011-07-21 7:32 ` [RFA 9/8] New port: TI C6x: Document on qXfer:fdpic:read packet Yao Qi
2011-07-22 12:22 ` Mike Frysinger [this message]
2011-07-25 7:23 ` [RFA 4/8] New port: TI C6x: Read loadmap from gdbserver Yao Qi
2011-08-03 1:29 ` ping: " Yao Qi
2011-08-03 8:59 ` Eli Zaretskii
2011-08-08 0:30 ` Mike Frysinger
2011-08-08 2:47 ` Yao Qi
2011-08-08 8:30 ` Mark Kettenis
2011-08-08 13:05 ` Yao Qi
2011-08-08 14:01 ` Mark Kettenis
2011-08-08 13:32 ` Pedro Alves
2011-08-09 3:12 ` Yao Qi
2011-08-10 12:37 ` Mark Kettenis
2011-08-10 14:03 ` Pedro Alves
2011-08-10 14:08 ` Pedro Alves
2011-08-14 16:11 ` [committed] " 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='CAJaTeTo6Yzqjq=L1=fXvgQmJb+UZNtsfRQtXyHY580YNTTZBFg@mail.gmail.com' \
--to=vapier@gentoo.org \
--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