alex@alex-smith.me.uk
2018-05-03 10:10:06 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23135
Bug ID: 23135
Summary: Configuring logging inside a user-defined command does
not take effect
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: ***@alex-smith.me.uk
Target Milestone: ---
In GDB 8.1, "set logging" commands inside a user-defined command do not take
effect when the user-defined command is executed. For example:
(gdb) define setup-logging
Type commands for definition of "setup-logging".
End with a line saying just "end".
(gdb) bt
#0 0x00007ffff69c2f4b in raise () from /lib64/libc.so.6
#1 0x00007ffff69ad591 in abort () from /lib64/libc.so.6
#2 0x0000000000401783 in FatalImpl (inFile=0x404d28
"Build/Release/Engine/Runtime/Engine/Source/Engine.cpp", inLine=47,
inFormat=<optimized out>) at
Build/Release/Engine/Runtime/Core/Source/Log.cpp:43
#3 0x0000000000403197 in Engine::Run (this=<optimized out>) at
Build/Release/Engine/Runtime/Engine/Source/Engine.cpp:47
#4 0x00000000004031ba in main (argc=<optimized out>, argv=<optimized out>) at
Build/Release/Engine/Runtime/Engine/Source/Main.cpp:23
(gdb)
The command output is still appearing on stdout and foo.txt is empty.
Performing the "set logging" commands manually behaves as expected (the output
is redirected).
This worked in GDB 8.0 (and many prior versions). This change in behaviour has
broken my custom .gdbinit hooks to implement colour backtraces (they redirect
the output to a file and then invoke a shell command to colourise it).
Bug ID: 23135
Summary: Configuring logging inside a user-defined command does
not take effect
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: ***@alex-smith.me.uk
Target Milestone: ---
In GDB 8.1, "set logging" commands inside a user-defined command do not take
effect when the user-defined command is executed. For example:
(gdb) define setup-logging
Type commands for definition of "setup-logging".
End with a line saying just "end".
set logging redirect on
set logging on foo.txt
end
(gdb) setup-loggingset logging on foo.txt
end
(gdb) bt
#0 0x00007ffff69c2f4b in raise () from /lib64/libc.so.6
#1 0x00007ffff69ad591 in abort () from /lib64/libc.so.6
#2 0x0000000000401783 in FatalImpl (inFile=0x404d28
"Build/Release/Engine/Runtime/Engine/Source/Engine.cpp", inLine=47,
inFormat=<optimized out>) at
Build/Release/Engine/Runtime/Core/Source/Log.cpp:43
#3 0x0000000000403197 in Engine::Run (this=<optimized out>) at
Build/Release/Engine/Runtime/Engine/Source/Engine.cpp:47
#4 0x00000000004031ba in main (argc=<optimized out>, argv=<optimized out>) at
Build/Release/Engine/Runtime/Engine/Source/Main.cpp:23
(gdb)
The command output is still appearing on stdout and foo.txt is empty.
Performing the "set logging" commands manually behaves as expected (the output
is redirected).
This worked in GDB 8.0 (and many prior versions). This change in behaviour has
broken my custom .gdbinit hooks to implement colour backtraces (they redirect
the output to a file and then invoke a shell command to colourise it).
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.