Discussion:
[Bug cli/22234] New: complaints don't end with newlines
tromey at sourceware dot org
2017-10-02 11:16:10 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22234

Bug ID: 22234
Summary: complaints don't end with newlines
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

I did "set complaints 1" and ran gdb on an executable that
has some DWARF issues (see https://github.com/rust-lang/rust/issues/44412).

I got output like this:

(gdb) file -readnow libxul.so.dbg
Reading symbols from libxul.so.dbg...expanding to full symbols...unsupported
tag: 'DW_TAG_unspecified_type'...const value length mismatch for
'nsISupports::COMTypeInfo<nsISupports, void>::kIID', got 16, expected 0...Child
DIE 0x9a0d and its abstract origin 0x9e60 have different parents...cannot get
low and high bounds for subprogram DIE at 42795....debug_line address at offset
0x19c6 is 0 [in module /tmp/libxul.so.dbg]...Member function "~MetaData"
(offset 74544) is virtual but the vtable offset is not
specified...DW_AT_call_target target DIE has invalid low pc, for referencing
DIE 0x1d356 [in module /tmp/libxul.so.dbg]...Multiple children of DIE 0xa8f7c
refer to DIE 0xa2549 as their abstract origin...location expression too
complex...No DW_FORM_block* DW_AT_call_value for DW_TAG_call_site child DIE
0x10ea38 [in module /tmp/libxul.so.dbg]...missing name for subprogram DIE at
9803491...Only single DW_OP_reg or DW_OP_fbreg is supported for DW_FORM_block*
DW_AT_location is supported for DW_TAG_call_site child DIE 0xf8c6ae [in module
/tmp/libxul.so.dbg]...Duplicate PC 0xf1202e for DW_TAG_call_site DIE 0x5d0ad32
[in module /tmp/libxul.so.dbg]...^CQuit


This would be a lot more readable with newlines.
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-10-04 19:44:12 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22234

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6afcf761c2d8ffcb04ede75d1e670042e196bc5b

commit 6afcf761c2d8ffcb04ede75d1e670042e196bc5b
Author: Tom Tromey <***@tromey.com>
Date: Wed May 16 23:30:43 2018 -0600

Make complaint output prettier

Currently complaints are not always printed with a newline. For
example, when I run gdb on itself, I see output like:

(gdb) set complaints 5
(gdb) file ./gdb/gdb
Reading symbols from ./gdb/gdb...DW_AT_low_pc 0x0 is zero for DIE at
0x437dd4 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at
offset 0x21bf9 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc
0x0 is zero for DIE at 0x5a85dd [in module
/home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x2dc2d is 0
[in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc 0x0 is zero for DIE
at 0xab6033 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address at
offset 0x4f683 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc
0x0 is zero for DIE at 0x10028f0 [in module
/home/tromey/gdb/build/gdb/gdb]....debug_line address at offset 0x75edf is 0
[in module /home/tromey/gdb/build/gdb/gdb]...DW_AT_low_pc 0x0 is zero for DIE
at 0x1021364 [in module /home/tromey/gdb/build/gdb/gdb]....debug_line address
at offset 0x76f62 is 0 [in module /home/tromey/gdb/build/gdb/gdb]...done.

That's one very long line. I find it quite difficult to read that,
and I thought it would be better with some newlines, which is what
this patch does. Now the output looks like:

(gdb) file ./gdb
Reading symbols from ./gdb...
DW_AT_low_pc 0x0 is zero for DIE at 0x437dd4 [in module
/home/tromey/gdb/build/gdb/gdb]
.debug_line address at offset 0x21bf9 is 0 [in module
/home/tromey/gdb/build/gdb/gdb]
DW_AT_low_pc 0x0 is zero for DIE at 0x5a85dd [in module
/home/tromey/gdb/build/gdb/gdb]
.debug_line address at offset 0x2dc2d is 0 [in module
/home/tromey/gdb/build/gdb/gdb]
done.

gdb/ChangeLog
2018-10-04 Tom Tromey <***@tromey.com>

PR cli/22234:
* complaints.c: Emit \n.

gdb/testsuite/ChangeLog
2018-10-04 Tom Tromey <***@tromey.com>

PR cli/22234:
* gdb.dwarf2/dw2-stack-boundary.exp: Update expected output.
* gdb.gdb/complaints.exp (test_short_complaints): Update expected
output.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-10-04 19:47:18 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22234

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.3

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...