Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Ricard Wanderlof <ricard.wanderlof@axis.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][CRISv32] Add support for threaded debugging
Date: Mon, 02 Sep 2013 18:04:00 -0000	[thread overview]
Message-ID: <5224D319.1000704@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1308301528420.10770@lnxricardw.se.axis.com>

(fixing subject)

On 08/30/2013 02:29 PM, Ricard Wanderlof wrote:
> 
> This patch adds support for threaded debugging on the CRISv32
> architecture. It's been floating around for several years now in our local
> repository so it's way overdue pushing upstream.
> 
> Patch included inline for review and as attachement for use.
> 
> 
> Suggested-by: Edgar Iglisias <edgar.iglesias@gmail.com>
> Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
> 
> 
> 2013-08-30  Ricard Wanderlof  <ricardw@axis.com>
> 
>   	* cris-tdep.c: Fix typedef for elf_greg_t.
>   	  (cris_gdbarch_init): Add call to
>   	  set_gdbarch_fetch_tls_load_module_address.

Indentation doesn't look right.  Should be indented
with a single tab.

> Suggested-by: Edgar Iglisias <edgar.iglesias@gmail.com>

(Note: surname/address don't match)

> Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
>
>
> 2013-08-30  Ricard Wanderlof  <ricardw@axis.com>
>
>   	* cris-tdep.c: Fix typedef for elf_greg_t.

This seems to be unrelated to threaded debugging support.
It just looks like a host-dependency fix.  Please keep logically unrelated
patches separate, and always send them as separate threads each with their
own rationale.

(Note that "fix" is not "what" changed, but "why" you changed it, so
it's not the proper ChangeLog description of the change.)

In this case, the fix should just go the extra mile and remove the
reliance on host alignment from this type, that is representing an
external structure.  IOW, that typedef, if any, would better
be:

  typedef gdb_byte cris_elf_greg_t[4];

See frv_linux_supply_gregset for example.

>   	  (cris_gdbarch_init): Add call to
>   	  set_gdbarch_fetch_tls_load_module_address.

This part looks OK, though it did raise some eyebrows to have
GNU/Linux-specific code in cris-tdep.c, rather than in a cris-linux-tdep.c
file.  It seems there's no real support for cris bare-metal debugging?

>
> gdbserver
>
>     	* linux-crisv32-low.c (ps_get_thread_area): New function.

This part is OK, though should mention also the addition of
PTRACE_GET_THREAD_AREA, and,

> +  *base = (void *) ((char *)*base - idx);

missing space after '(char *) '.

-- 
Pedro Alves


  reply	other threads:[~2013-09-02 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 13:30 [PATCH] Fix CRISv32 compilation Ricard Wanderlof
2013-09-02 18:04 ` Pedro Alves [this message]
2013-09-03 12:35   ` [PATCH][CRISv32] Add support for threaded debugging Ricard Wanderlof
2013-09-03 14:32     ` Pedro Alves
2013-09-03 14:58       ` Ricard Wanderlof
2013-09-03 15:02         ` Pedro Alves

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=5224D319.1000704@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ricard.wanderlof@axis.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