File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232if gdbpy_version == b'' :
3333 raise unittest .SkipTest ("gdb not built with embedded python support" )
3434
35+ # Verify that "gdb" can load our custom hooks
36+ p = subprocess .Popen (["gdb" , "--batch" , cmd ,
37+ "--args" , sys .executable ],
38+ stdout = subprocess .PIPE , stderr = subprocess .PIPE )
39+ __ , gdbpy_errors = p .communicate ()
40+ if b"auto-loading has been declined" in gdbpy_errors :
41+ msg = "gdb security settings prevent use of custom hooks: %s"
42+ raise unittest .SkipTest (msg % gdbpy_errors )
43+
3544def gdb_has_frame_select ():
3645 # Does this build of gdb have gdb.Frame.select ?
3746 cmd = "--eval-command=python print(dir(gdb.Frame))"
Original file line number Diff line number Diff line change @@ -301,6 +301,9 @@ Extension Modules
301301Tests
302302-----
303303
304+ - Issue #15043: test_gdb is now skipped entirely if gdb security settings
305+ block loading of the gdb hooks
306+
304307- Issue #14026: In test_cmd_line_script, check that sys.argv is populated
305308 correctly for the various invocation approaches (Patch by Jason Yeo)
306309
You can’t perform that action at this time.
0 commit comments