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/17409] New: Built-in python doesn't see an arguments to the function


https://sourceware.org/bugzilla/show_bug.cgi?id=17409

            Bug ID: 17409
           Summary: Built-in python doesn't see an arguments to the
                    function
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: minor
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: hi-angel at yandex dot ru

Python in a script don't see a transmitted arguments. Here's a test function:

define test
  p $arg0
python
print(str(gdb.parse_and_eval("$arg0")))
end
end

It takes one string as an argument, and just prints it at first from the
outside, and at second from within of a python block. But as the result instead
of a string you will see in second time ÂvoidÂ.

A workaround for the present time is to assign $arg0 to something else. E.g. 

define test
  set $MyVar = $arg0
python
print(str(gdb.parse_and_eval("$MyVar")))
end
end

-- 
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]