From: Pedro Alves <pedro@codesourcery.com>
To: pmuldoon@redhat.com
Cc: Kevin Pouget <kevin.pouget@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug
Date: Wed, 12 Oct 2011 15:59:00 -0000 [thread overview]
Message-ID: <201110121659.13715.pedro@codesourcery.com> (raw)
In-Reply-To: <m3y5wqmdpj.fsf@redhat.com>
On Wednesday 12 October 2011 16:28:24, Phil Muldoon wrote:
> Kevin Pouget <kevin.pouget@gmail.com> writes:
>
>
> > it looks like these enums are not documented, are they? I can't grep
> > 'FRAME_UNWIND_NO_REASON' in gdb.texinfo
>
> Yeah, that at least is a bug for sure.
>
> > ('2' was a bad example, but the reason why I first used '0' was
> > because it was returned by Frame.unwind_stop_reason(), as depicted in
> > the first mail)
> > by the way, python print
> > gdb.frame_stop_reason_string(gdb.FRAME_UNWIND_FIRST_ERROR) crashes the
> > same way, there is certainly a few more lines to fix on the Python
> > side
>
> I can look at this, or you can hack on it. I don't mind.
I found this:
/* Note: These would probably be best exposed as class attributes of
Frame, but I don't know how to do it except by messing with the
type's dictionary. That seems too messy. */
PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME);
PyModule_AddIntConstant (gdb_module, "DUMMY_FRAME", DUMMY_FRAME);
PyModule_AddIntConstant (gdb_module, "INLINE_FRAME", INLINE_FRAME);
PyModule_AddIntConstant (gdb_module, "TAILCALL_FRAME", TAILCALL_FRAME);
PyModule_AddIntConstant (gdb_module, "SIGTRAMP_FRAME", SIGTRAMP_FRAME);
PyModule_AddIntConstant (gdb_module, "ARCH_FRAME", ARCH_FRAME);
PyModule_AddIntConstant (gdb_module, "SENTINEL_FRAME", SENTINEL_FRAME);
PyModule_AddIntConstant (gdb_module,
"FRAME_UNWIND_NO_REASON", UNWIND_NO_REASON);
PyModule_AddIntConstant (gdb_module,
"FRAME_UNWIND_NULL_ID", UNWIND_NULL_ID);
PyModule_AddIntConstant (gdb_module,
"FRAME_UNWIND_FIRST_ERROR", UNWIND_FIRST_ERROR);
PyModule_AddIntConstant (gdb_module,
"FRAME_UNWIND_INNER_ID", UNWIND_INNER_ID);
PyModule_AddIntConstant (gdb_module,
"FRAME_UNWIND_SAME_ID", UNWIND_SAME_ID);
PyModule_AddIntConstant (gdb_module,
"FRAME_UNWIND_NO_SAVED_PC", UNWIND_NO_SAVED_PC);
We should definitely reimplement these enums in a table in a
.def file. That's 2 places already that map the enums to
something else. This one is missing UNWIND_UNAVAILABLE.
And what do you think of making UNWIND_FIRST_ERROR
an alias like in my patch? Do you think that's likely
to break anything?
--
Pedro Alves
next prev parent reply other threads:[~2011-10-12 15:59 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 [this message]
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=201110121659.13715.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=kevin.pouget@gmail.com \
--cc=pmuldoon@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