Discussion:
[Bug python/19314] New: unwinder API should accept int/long in addition to Value
tromey at sourceware dot org
2015-11-30 18:45:16 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19314

Bug ID: 19314
Summary: unwinder API should accept int/long in addition to
Value
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

I'm writing an unwinder in Python.

I was getting this error from my unwinder:

ValueError: Bad register value


I tracked this down to this code in py-unwind.c:


if (pyo_reg_value == NULL
|| (value = value_object_to_value (pyo_reg_value)) == NULL)
{
PyErr_SetString (PyExc_ValueError, "Bad register value");
return NULL;
}


I think in addition to accepting a gdb.Value here, it would
be nice to accept a Python integer. In some cases it is more
convenient to retrieve an integer; in my case I am reading stack
memory using Inferior.read_memory, then converting it to an int
using the Python struct facility.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 06:38:42 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=19314

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I wonder if this was done due to unusual registers, like vectors.
Maybe just improving the error message would be enough.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...