[issue32531] gdb.execute can not put string value.

2019-03-31 Thread Berker Peksag


Change by Berker Peksag :


--
hgrepos:  -377

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32531] gdb.execute can not put string value.

2019-03-31 Thread Berker Peksag


Berker Peksag  added the comment:

gdb.execute() is part of GDB's Python API and maintained by GDB maintainers. 
This tracker is for issues with Python interpreter and its standard library.

--
nosy: +berker.peksag
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32531] gdb.execute can not put string value.

2018-01-10 Thread callmekohei

New submission from callmekohei :

Hello! I'm callmekohei! (^_^)/



   Problems summary


gdb.execute can not put string value.



   Steps to Reproduce


// create 
$ gcc -g foo.c

// launch sdb
$ sdb a.out

// set breakpoint
$ b foo.c:5

// run
$ run

// next
$ n



   Current Behavior


(gdb)  n
6   n = 2;
False
True



   Expected Behavior


(gdb)  n
False
False



   Code 


// .gdbinit

set startup-with-shell off

python

class Foo(gdb.Command):

def __init__(self):
gdb.Command.__init__(self \
, name= 'n'   \
, command_class   = gdb.COMMAND_USER  \
, completer_class = gdb.COMPLETE_NONE \
, prefix  = True)

def invoke(self, arg, from_tty):
output = gdb.execute(command='next',from_tty=False, to_string=True)
print(output is None)
print(output == '')

Foo()

end


// foo.c

#include 

int main(int argc, char *args[])
{
int n = 1;
n = 2;
n = 3;
n = 4;
n = 5;
n = 6;
n = 7;
n = 8;
n = 9;
printf("n = %d\n",n);
return 0;
}



   Others 


see also:

https://github.com/mono/sdb/issues/45

--
components: macOS
hgrepos: 377
messages: 309791
nosy: callmekohei, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: gdb.execute can not put string value.
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com