[Bug breakpoints/18275] dprintf (call style) could automatically flush the standard output
malaperle at gmail dot com
sourceware-bugzilla@sourceware.org
Fri May 1 20:20:00 GMT 2015
https://sourceware.org/bugzilla/show_bug.cgi?id=18275
--- Comment #4 from Marc-Andre Laperle <malaperle at gmail dot com> ---
(In reply to Simon Marchi from comment #2)
> Hi Marc-André,
>
> Can you check if this small fix does the job for you?
I tried it and I got a crash, strangely:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fd722fc2fdd, pid=15355, tid=140561991497472
#
# JRE version: OpenJDK Runtime Environment (7.0_79-b14) (build 1.7.0_79-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.79-b02 mixed mode linux-amd64
compressed oops)
# Derivative: IcedTea 2.5.5
# Distribution: Ubuntu 14.10, package 7u79-2.5.5-0ubuntu0.14.10.2
# Problematic frame:
# C [libc.so.6+0x6dfdd] fflush+0xd
#
# Core dump written. Default location: /home/emalape/Documents/dev/eclipse/core
or core.15355
#
# An error report file with more information is saved as:
# /home/emalape/Documents/dev/eclipse/hs_err_pid15355.log
(gdb) bt
#0 0x00007f2033ab6e37 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f2033ab8528 in __GI_abort () at abort.c:89
#2 0x00007f203137d8b9 in os::abort (dump_core=<optimized out>)
at
/build/buildd/openjdk-7-7u79-2.5.5/build/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1626
#3 0x00007f203150e0ef in VMError::report_and_die
(this=this@entry=0x7f203444fd90)
at
/build/buildd/openjdk-7-7u79-2.5.5/build/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1054
#4 0x00007f2031386a66 in JVM_handle_linux_signal (sig=11, info=0x7f203444fff0,
ucVoid=0x7f203444fec0,
abort_if_unrecognized=<optimized out>)
at
/build/buildd/openjdk-7-7u79-2.5.5/build/openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp:531
#5 <signal handler called>
#6 __GI__IO_fflush (fp=0x33e3e400) at iofflush.c:40
#7 0x00007f203445048f in ?? ()
#8 0x0000000000000000 in ?? ()
> It could be similar to how "set dprintf-channel" works. It would be "set
> dprintf-flush". If unset (the default), it wouldn't do anything. If it is
> set, it would be evaluated as an expression and that value would be passed
> to fflush. In your case, you would do "set dprintf-flush stdout".
>
> What do you think?
I like this proposal.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list