public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/19786] Python: gdb.execute("checkpoint", to_string=True) returns an empty string
       [not found] <bug-19786-4717@http.sourceware.org/bugzilla/>
@ 2021-07-18 23:53 ` evan_l00 at qq dot com
  2021-07-18 23:56 ` evan_l00 at qq dot com
  2022-06-05 15:25 ` tromey at sourceware dot org
  2 siblings, 0 replies; 3+ messages in thread
From: evan_l00 at qq dot com @ 2021-07-18 23:53 UTC (permalink / raw)
  To: gdb-prs

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

evan <evan_l00 at qq dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evan_l00 at qq dot com

--- Comment #1 from evan <evan_l00 at qq dot com> ---
The next command returns an empty string too.

(gdb) py print('>' + gdb.execute('next', to_string=True) + '<')
4               return 0;
><

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug python/19786] Python: gdb.execute("checkpoint", to_string=True) returns an empty string
       [not found] <bug-19786-4717@http.sourceware.org/bugzilla/>
  2021-07-18 23:53 ` [Bug python/19786] Python: gdb.execute("checkpoint", to_string=True) returns an empty string evan_l00 at qq dot com
@ 2021-07-18 23:56 ` evan_l00 at qq dot com
  2022-06-05 15:25 ` tromey at sourceware dot org
  2 siblings, 0 replies; 3+ messages in thread
From: evan_l00 at qq dot com @ 2021-07-18 23:56 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from evan <evan_l00 at qq dot com> ---
And it seems this is a regression because lower versions of gdb can return the
output, but version 8.2 I'm using return empty string

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug python/19786] Python: gdb.execute("checkpoint", to_string=True) returns an empty string
       [not found] <bug-19786-4717@http.sourceware.org/bugzilla/>
  2021-07-18 23:53 ` [Bug python/19786] Python: gdb.execute("checkpoint", to_string=True) returns an empty string evan_l00 at qq dot com
  2021-07-18 23:56 ` evan_l00 at qq dot com
@ 2022-06-05 15:25 ` tromey at sourceware dot org
  2 siblings, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2022-06-05 15:25 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
This checkpoint code is kind of lame (and also maybe unsupported).
Anyway you can get the effect you want using from_tty:

(gdb) python x = gdb.execute('checkpoint',from_tty=True,to_string=True)
(gdb) python print(x)
checkpoint 1: fork returned pid 1581941.

I'm going to close this ticket.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-05 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19786-4717@http.sourceware.org/bugzilla/>
2021-07-18 23:53 ` [Bug python/19786] Python: gdb.execute("checkpoint", to_string=True) returns an empty string evan_l00 at qq dot com
2021-07-18 23:56 ` evan_l00 at qq dot com
2022-06-05 15:25 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).