This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/19314] New: unwinder API should accept int/long in addition to Value


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]