public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/28620] New: logging/output redirect interaction between python and stepping commands is broken (and sometimes segfaults)
@ 2021-11-23  9:37 plasmahh at gmx dot net
  2021-11-23 10:29 ` [Bug python/28620] " aburgess at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: plasmahh at gmx dot net @ 2021-11-23  9:37 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28620
           Summary: logging/output redirect interaction between python and
                    stepping commands is broken (and sometimes segfaults)
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: plasmahh at gmx dot net
  Target Milestone: ---

Tried with todays HEAD too.

While developing my python plugin I noticed that output redirection of stepping
commands does not work in python (e.g. gdb.execute("si",False,True). Since all
I needed at that point was supressing the output, I tried using the logging
redirect mechanism and things crashed on me.

To reproduce, start any program within gdb (-nh) to a point where stepping is
possible. Then do

python for c in "set logging redirect on\nset logging on\nsi".splitlines():
gdb.execute(c,False,True)

and after that 

set logging off


This will reliably segfault for me (and some others on IRC too)

Further I noticed that when doing 

set logging redirect on
set logging on
si
set logging off
python gdb.execute("set logging on",False,True)

and then do a 

show logging

Half of the output goes to the redirected file, and half of  it is displayed on
the terminal (the prefix for each entry that is)

A "set logging off" after that will crash too.

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

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

end of thread, other threads:[~2022-08-12 20:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23  9:37 [Bug python/28620] New: logging/output redirect interaction between python and stepping commands is broken (and sometimes segfaults) plasmahh at gmx dot net
2021-11-23 10:29 ` [Bug python/28620] " aburgess at redhat dot com
2022-05-13 17:51 ` keith.hanlan at ericsson dot com
2022-08-12 20:03 ` 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).