Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Kevin Pouget <kevin.pouget@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug
Date: Wed, 12 Oct 2011 14:33:00 -0000	[thread overview]
Message-ID: <m339eynuu8.fsf@redhat.com> (raw)
In-Reply-To: <CAPftXULjbKonB=-YneTVg+jeZiUDUruqtjrTighL8dgXTWoo_g@mail.gmail.com>	(Kevin Pouget's message of "Wed, 12 Oct 2011 16:02:20 +0200")

Kevin Pouget <kevin.pouget@gmail.com> writes:

> Hi,
>
> I wanted to discuss the best way to solve this bug before going any
> further in the development:
>
>> (gdb) py print gdb.frame_stop_reason_string(2)
>> /home/kevin/travail/git/gdb/gdb/frame.c:2372: internal-error: Invalid frame stop reason
>> A problem internal to GDB has been detected,further debugging may prove unreliable.

Why not use the supplied gdb constants in this case?  "2" does not map
to any enum.

IE gdb.FRAME_UNWIND_NO_REASON

These 1:1 mappings of the internal GDB enums.  

FWIW I think we should error check this function for each enum.  The < 0
&& >UNWIND_NO_SAVED_PC check seems too liberal.

Cheers,

Phil


  reply	other threads:[~2011-10-12 14:33 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 [this message]
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
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=m339eynuu8.fsf@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevin.pouget@gmail.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