Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Luis Machado <luisgpm@linux.vnet.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] Backtrace prints wrong argument value
Date: Sun, 16 Sep 2007 19:45:00 -0000	[thread overview]
Message-ID: <20070916194510.GC27177@caradoc.them.org> (raw)
In-Reply-To: <1189694765.4564.5.camel@localhost>

On Thu, Sep 13, 2007 at 11:46:05AM -0300, Luis Machado wrote:
> :ADDPATCH PowerPC-64:
> 
> Hi,
> 
> Bringing back this topic, i've written a patch to address this issue on
> ppc's side, providing a function to specify call-clobbered registers
> based on the ABI, similar to the S390's.

:REVIEWMAIL:

I guess this works, then?  That's great.

> 2007-09-13  Luis Machado  <luisgpm@br.ibm.com>
> 
>     * rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function.
>     (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as 
>     default dwarf2_frame_set_init_reg function.

ChangeLog entries should be tab indented - you probably know this and
your mailer ate the tabs?  Indentation all over your patch is wrong,
too.

> +/* DWARF-2 frame support. Used to handle the detection of
> +   clobbered registers during function calls.  */

Two spaces after periods, please.  More occurances below.

> + static void

No leading space there.

> +ppc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
> +                            struct dwarf2_frame_state_reg *reg,
> +          struct frame_info *next_frame)

Those lines don't line up.  More occurances below.

> +  /* Call-saved GP registers.  */
> +  if ((regnum >= (tdep->ppc_gp0_regnum + 14)
> +    && regnum <= (tdep->ppc_gp0_regnum + 31))
> +    || (regnum == (tdep->ppc_gp0_regnum + 1)))
> +    reg->how = DWARF2_FRAME_REG_SAME_VALUE;

You don't need the parentheses around (tdep->ppc_gp0_regnum + 14), et
cetera; >= and <= are very low precedence.

> @@ -3790,6 +3852,10 @@
>            tdep->ppc_vr0_regnum = 71;
>            tdep->ppc_vrsave_regnum = 104;
>          }
> +
> +      /* Frame handling.  */
> +      dwarf2_frame_set_init_reg (gdbarch, ppc_dwarf2_frame_init_reg);
> +
>        /* Fall Thru */
>      case GDB_OSABI_NETBSD_AOUT:
>      case GDB_OSABI_NETBSD_ELF:

I don't think this should be GNU/Linux specific, so it should probably
be elsewhere (before gdbarch_init_osabi).

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-09-16 19:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 19:13 Luis Machado
2007-04-25 19:25 ` Daniel Jacobowitz
2007-04-25 22:28   ` Luis Machado
2007-04-30 13:31     ` Luis Machado
2007-05-16  5:34   ` Luis Machado
2007-05-16 14:43     ` Daniel Jacobowitz
2007-05-16 15:20       ` Luis Machado
2007-05-16 15:23         ` Daniel Jacobowitz
2007-09-13 14:47       ` Luis Machado
2007-09-16 19:45         ` Daniel Jacobowitz [this message]
2007-09-17 13:05           ` Luis Machado
2007-09-17 13:15             ` Daniel Jacobowitz
2007-09-17 13:30               ` Luis Machado
2007-09-17 13:37                 ` Daniel Jacobowitz
2007-09-17 13:46                   ` Luis Machado
2007-09-17 14:00                   ` Luis Machado
2007-09-17 14:04                     ` Daniel Jacobowitz
2007-09-17 16:02                       ` Luis Machado
2007-09-17 17:15                       ` Luis Machado
2007-09-17 17:18                         ` Daniel Jacobowitz
2007-09-17 17:34                           ` Luis Machado
2007-09-17 17:48                             ` Daniel Jacobowitz
2007-10-03 14:58                               ` Luis Machado
2007-10-21 21:41                           ` Luis Machado
2007-10-22  0:03                             ` Joel Brobecker
2007-10-22  1:20                               ` Daniel Jacobowitz
2007-10-22  4:11                                 ` Joel Brobecker
2007-10-24 20:50                                   ` Daniel Jacobowitz
2007-10-24 20:59                                     ` Joel Brobecker
2007-10-24 21:01                                       ` Daniel Jacobowitz
2007-10-24 22:23                                     ` Pedro Alves
2007-10-24 22:38                                       ` 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=20070916194510.GC27177@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=luisgpm@linux.vnet.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