Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Kevin Pouget <kevin.pouget@gmail.com>
Cc: Tom Tromey <tromey@redhat.com>,
	pmuldoon@redhat.com, gdb-patches@sourceware.org
Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug
Date: Fri, 14 Oct 2011 15:00:00 -0000	[thread overview]
Message-ID: <201110141600.20561.pedro@codesourcery.com> (raw)
In-Reply-To: <CAPftXULVgZYuYG7dK2E3=c5F9+gOO3=_jdSCDy2raf9YV9xi3A@mail.gmail.com>

On Friday 14 October 2011 15:40:49, Kevin Pouget wrote:

> 2011-10-14  Kevin Pouget  <kevin.pouget@st.com>
> 
> 	* frame.c (frame_stop_reason_string): Rewrite using
> 	unwind_stop_reasons.def.
> 	* frame.h (enum unwind_stop_reason): Likewise.
> 	* python/py-frame.c (gdbpy_initialize_frames): Likewise.
> 	(gdbpy_frame_stop_reason_string): Use new enum unwind_stop_reason
> 	constants for bound-checking.
> 	* unwind_stop_reasons.def: New file.
> 

You're missing this change that was in my patch:

Index: src/gdb/stack.c
===================================================================
--- src.orig/gdb/stack.c        2011-10-11 12:43:20.000000000 +0100
+++ src/gdb/stack.c     2011-10-12 15:38:23.083658404 +0100
@@ -1625,7 +1625,7 @@ backtrace_command_1 (char *count_exp, in
       enum unwind_stop_reason reason;
 
       reason = get_frame_unwind_stop_reason (trailing);
-      if (reason > UNWIND_FIRST_ERROR)
+      if (reason >= UNWIND_FIRST_ERROR)
        printf_filtered (_("Backtrace stopped: %s\n"),
                         frame_stop_reason_string (reason));
     }

because before, UNWIND_FIRST_ERROR was not an alias, now it is.

I notice only these two descriptions are capitalized:

> +SET (UNWIND_NO_REASON, "No reason")

> +SET (UNWIND_UNAVAILABLE, "Not enough registers or memory available to unwind further")

(the latter my fault).  Can you lowercase them too for consistency?

Also, I believe as is, we lose gdb.FRAME_UNWIND_FIRST_ERROR?

-- 
Pedro Alves


  reply	other threads:[~2011-10-14 15:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 14:02 Kevin Pouget
2011-10-12 14:33 ` Phil Muldoon
2011-10-12 14:52 ` Pedro Alves
2011-10-12 15:18   ` Kevin Pouget
2011-10-12 15:28     ` Phil Muldoon
2011-10-12 15:59       ` Pedro Alves
2011-10-12 17:07         ` Tom Tromey
2011-10-13 11:25           ` Kevin Pouget
2011-10-13 11:27             ` Kevin Pouget
2011-10-13 15:19               ` Pedro Alves
2011-10-14  8:18                 ` Kevin Pouget
2011-10-14 14:22                   ` Tom Tromey
2011-10-14 14:41                     ` Kevin Pouget
2011-10-14 15:00                       ` Pedro Alves [this message]
2011-10-17 10:31                         ` Kevin Pouget
2011-10-19 21:22                           ` Tom Tromey
2011-10-24 16:53                             ` Kevin Pouget
2011-10-25  0:59                               ` Eli Zaretskii
2011-10-25  8:31                                 ` Kevin Pouget
2011-10-25 12:49                                   ` Eli Zaretskii
2011-10-25 14:27                                     ` Kevin Pouget
2011-10-27 10:02                                       ` Kevin Pouget
2011-10-27 10:16                                         ` Eli Zaretskii
2011-10-27 12:11                                           ` Kevin Pouget
2011-10-12 15:31     ` Pedro Alves
2011-10-12 17:06     ` Tom Tromey
2011-10-12 17:00   ` Tom Tromey

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=201110141600.20561.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevin.pouget@gmail.com \
    --cc=pmuldoon@redhat.com \
    --cc=tromey@redhat.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