* [OB] dwarf2loc.c: fix read_sleb128 use ULONGEST
@ 2010-06-04 2:44 Hui Zhu
2010-06-04 17:34 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Hui Zhu @ 2010-06-04 2:44 UTC (permalink / raw)
To: gdb-patches ml
Hi,
Got some error with this file:
gcc -g -O2 -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
-DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd
-I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber
-I../../src/gdb/../libdecnumber -I../../src/gdb/gnulib -Ignulib
-DMI_OUT=1 -DTUI=1 -DGDBTK -I/usr/include -I/usr/include -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function
-Wno-switch -Wno-char-subscripts -Werror -c -o dwarf2loc.o -MT
dwarf2loc.o -MMD -MP -MF .deps/dwarf2loc.Tpo ../../src/gdb/dwarf2loc.c
cc1: warnings being treated as errors
../../src/gdb/dwarf2loc.c: In function 'locexpr_describe_location_1':
../../src/gdb/dwarf2loc.c:1476: warning: 'l' may be used uninitialized
in this function
../../src/gdb/dwarf2loc.c:1476: note: 'l' was declared here
make[2]: *** [dwarf2loc.o] Error 1
This because:
data = read_sleb128 (data, end, &ul); //use ul
fprintf_filtered (stream, " %s", plongest (l)); //use l
read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end, LONGEST * r)
So change first line to l.
Thanks,
Hui
2010-06-04 Hui Zhu <teawater@gmail.com>
* dwarf2loc.c (disassemble_dwarf_expression): Change ul to l.
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- src/gdb/dwarf2loc.c 2010/06/02 19:37:55 1.85
+++ src/gdb/dwarf2loc.c 2010/06/04 02:39:16 1.86
@@ -1536,7 +1536,7 @@
fprintf_filtered (stream, " %s", pulongest (ul));
break;
case DW_OP_consts:
- data = read_sleb128 (data, end, &ul);
+ data = read_sleb128 (data, end, &l);
fprintf_filtered (stream, " %s", plongest (l));
break;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OB] dwarf2loc.c: fix read_sleb128 use ULONGEST
2010-06-04 2:44 [OB] dwarf2loc.c: fix read_sleb128 use ULONGEST Hui Zhu
@ 2010-06-04 17:34 ` Tom Tromey
2010-06-07 4:52 ` Hui Zhu
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2010-06-04 17:34 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches ml
>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:
>> 2010-06-04 Hui Zhu <teawater@gmail.com>
>> * dwarf2loc.c (disassemble_dwarf_expression): Change ul to l.
Thank you.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OB] dwarf2loc.c: fix read_sleb128 use ULONGEST
2010-06-04 17:34 ` Tom Tromey
@ 2010-06-07 4:52 ` Hui Zhu
0 siblings, 0 replies; 3+ messages in thread
From: Hui Zhu @ 2010-06-07 4:52 UTC (permalink / raw)
To: tromey; +Cc: gdb-patches ml
On Sat, Jun 5, 2010 at 00:42, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:
>
>>> 2010-06-04 Hui Zhu <teawater@gmail.com>
>>> * dwarf2loc.c (disassemble_dwarf_expression): Change ul to l.
>
> Thank you.
>
> Tom
>
Welcome.
Hui
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-07 4:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-04 2:44 [OB] dwarf2loc.c: fix read_sleb128 use ULONGEST Hui Zhu
2010-06-04 17:34 ` Tom Tromey
2010-06-07 4:52 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).