----- Original Message ----- > Dave, > > Since our last discussion [1], a further change to the "consolidation" > patch has been made. The assumption now is that the text address generated > by gdb is _always_ in base 16 form. Hence the if clause to check buf2 is > prefixed with 0x has been removed as indicated in the hunk below: > > - if (STRNEQ(buf2, "0x")) > - extract_hex(buf2, &curaddr, ':', TRUE); > + extract_hex(buf2, &curaddr, ':', TRUE); > > Please let me know if this assumption is valid. I don't think it is. The reason for the "0x" check is that gdb may split a single line of disassembly into two lines, or at least it used to. As I recall, I think I later added a gdb option initialization to prevent that from happening (?, but nonetheless, it could still be undone by the user. So it's best to leave the check in place. Dave > > With optimisation level 2 (default) the following warning is displayed: > > $ make warn > TARGET: X86_64 > CRASH: 7.1.2 > GDB: 7.6 > > cc -c -g -DX86_64 -DGDB_7_6 build_data.c -Wall -O2 -Wstrict-prototypes > -Wmissing-prototypes -fstack-protector -Wformat-security > cc -c -g -DX86_64 -DGDB_7_6 kernel.c -Wall -O2 -Wstrict-prototypes > -Wmissing-prototypes -fstack-protector -Wformat-security > kernel.c: In function ‘cmd_dis’: > kernel.c:1663:8: warning: ‘target’ may be used uninitialized in this function > [-Wmaybe-uninitialized] > if (curaddr != target) > ^ > Note that this is not seen when optimisation is disabled. To work around > this (what I suspect is a false positive), where target is declared it is > now initialised to zero even though its value is not considered if forward > or reverse is not set. > That's not a problem -- there are many place where that's done to work around that kind of warning. Thanks, Dave > [1]: https://www.redhat.com/archives/crash-utility/2015-August/msg00025.html > > Aaron Tomlin (2): > dis: Consolidate cmd_dis > dis: Introduce the -f option > > help.c | 2 + > kernel.c | 287 > +++++++++++++++++++++++---------------------------------------- > 2 files changed, 106 insertions(+), 183 deletions(-) > > -- > 2.4.3 > > -- > Crash-utility mailing list > Crash-utility@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/crash-utility -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility