These are chat archives for dropbox/pyston

11th
Nov 2016
Sun
@Daetalus
Nov 11 2016 00:47
Hi guys, what do you think about add some functions like _print_dictfor pretty prints the content of sequence object inside gdb?
 extern "C" void _print_dict(BoxedDict* self) {
     BoxedString* result = (BoxedString*)dictRepr(self);
     fprintf(stderr, std::string(result->s()).c_str());
 }
Marius Wachtler
@undingen
Nov 11 2016 01:22
I think there is little harm in adding this debugging helper functions but in that case does dumpEx(self, 1) not already do what you want?
or calling pyston::repr(self)->c_str()
Sun
@Daetalus
Nov 11 2016 01:24
Didn't use it before. Will try.
:)
Marius Wachtler
@undingen
Nov 11 2016 01:26
let me know if it works for you otherwise I'm open to adding a new helper functions but maybe we should try to keep it as generic as possible
Sun
@Daetalus
Nov 11 2016 01:26
ok, np. Thanks!
Kevin Modzelewski
@kmod
Nov 11 2016 02:03
I think improving the gdb experience would be awesome
I don't know how CPython does it, but they have some sort of integration where it will pretty-print python objects automatically