* breakpoint setting bug
@ 2010-02-21 18:28 Bruce Korb
2010-02-21 18:40 ` Keith Seitz
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Korb @ 2010-02-21 18:28 UTC (permalink / raw)
To: insight
I've got too much stuff on my plate at the moment.
If this is insufficient, I'll try to do a better
test case later. Sorry.
In the following code fragment, I set a breakpoint at "emit_file_text"
only to have insight/gdb to set it on line 1227 instead of 1219 or 1222.
Oops.
1211 static void
1212 emit_file_text (input, remaining_size, restore_name,
1213 quoted_restore_name, split_flag)
1214 FILE * input;
1215 off_t remaining_size;
1216 char const * restore_name;
1217 char const * quoted_restore_name;
1218 int * split_flag;
- 1219 {
1220 char buffer[BUFSIZ];
1221
- 1222 while (fgets (buffer, BUFSIZ, input))
1223 {
1224
1225 /* Output a line and test the length. */
1226
1227 if (!mandatory_prefix_mode
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: breakpoint setting bug
2010-02-21 18:28 breakpoint setting bug Bruce Korb
@ 2010-02-21 18:40 ` Keith Seitz
2010-02-21 19:09 ` Bruce Korb
0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2010-02-21 18:40 UTC (permalink / raw)
To: Bruce Korb; +Cc: insight
On 02/21/2010 09:48 AM, Bruce Korb wrote:
> I've got too much stuff on my plate at the moment.
> If this is insufficient, I'll try to do a better
> test case later. Sorry.
Yeah, this is definitely not enough information to appropriately assess
the bug. I used your example code to try to build a test case, but I
could not reproduce the bug.
> In the following code fragment, I set a breakpoint at "emit_file_text"
> only to have insight/gdb to set it on line 1227 instead of 1219 or 1222.
> Oops.
>
> 1211 static void
> 1212 emit_file_text (input, remaining_size, restore_name,
> 1213 quoted_restore_name, split_flag)
> 1214 FILE * input;
> 1215 off_t remaining_size;
> 1216 char const * restore_name;
> 1217 char const * quoted_restore_name;
> 1218 int * split_flag;
> - 1219 {
> 1220 char buffer[BUFSIZ];
> 1221
> - 1222 while (fgets (buffer, BUFSIZ, input))
> 1223 {
> 1224
> 1225 /* Output a line and test the length. */
> 1226
> 1227 if (!mandatory_prefix_mode
Was this application compiled with optimization? How did you set the
breakpoint? Clicked on the line in the source window or used the
console's "break" command? If the former, what happens when you type,
"break emit_file_text" in the console window? What version of
gdb/insight? What host and target?
If you could pare this down to a small test case, that would be of
considerable help.
Keith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: breakpoint setting bug
2010-02-21 18:40 ` Keith Seitz
@ 2010-02-21 19:09 ` Bruce Korb
2010-02-23 23:59 ` Keith Seitz
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Korb @ 2010-02-21 19:09 UTC (permalink / raw)
To: Keith Seitz; +Cc: insight
Hi Keith,
On Sun, Feb 21, 2010 at 10:28 AM, Keith Seitz <keiths@redhat.com> wrote:
> Yeah, this is definitely not enough information to appropriately assess the
Figured.
> bug. I used your example code to try to build a test case, but I could not
> reproduce the bug.
Figured. :(
>> In the following code fragment, I set a breakpoint at "emit_file_text"
>> only to have insight/gdb to set it on line 1227 instead of 1219 or 1222.
>> Oops.
> Was this application compiled with optimization?
sharutils compiles thus:
> gcc -DLOCALEDIR=\"/old-home/gnu/proj/sharutils-inst/share/locale\" \
> -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I../lib -I../intl -g -Wall -MT shar.o \
> -MD -MP -MF .deps/shar.Tpo -c -o shar.o shar.c
though I had the same symptom when adding "-O0" to the command.
> How did you set the breakpoint?
In the command window:
> gdb> b emit_file_text
> What version of gdb/insight?
$ insight --version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"
> What host and target?
host == target
> If you could pare this down to a small test case, that would be of
> considerable help.
I'm sure. That's the part that will take me a little time to get to....
Sorry to just tease you. ;)
If nothing pops up as obvious, I'll try to get to it in a week or so.
Thank you! Regards, Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: breakpoint setting bug
2010-02-21 19:09 ` Bruce Korb
@ 2010-02-23 23:59 ` Keith Seitz
0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2010-02-23 23:59 UTC (permalink / raw)
To: Bruce Korb; +Cc: insight
On 02/21/2010 10:40 AM, Bruce Korb wrote:
>> bug. I used your example code to try to build a test case, but I could not
>> reproduce the bug.
>
> Figured. :(
Isn't that how it always goes? O:-)
>> Was this application compiled with optimization?
>
> sharutils compiles thus:
>> gcc -DLOCALEDIR=\"/old-home/gnu/proj/sharutils-inst/share/locale\" \
>> -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I../lib -I../intl -g -Wall -MT shar.o \
>> -MD -MP -MF .deps/shar.Tpo -c -o shar.o shar.c
> though I had the same symptom when adding "-O0" to the command.
I don't see anything suspicious in that, so it's definitely a bug.
>> How did you set the breakpoint?
> In the command window:
>> gdb> b emit_file_text
Okay, that makes life a lot easier: It's a gdb bug. :-)
> GNU gdb 6.8
Ah. 6.8. I don't suppose I could cajole you into trying something a
little more recent? Gdb is currently on it's 7.1 release, so you're
using something that is almost three releases behind.
FWIW, I use insight pretty much daily, and I only ever use a snapshot. I
seldom run into problems.
> I'm sure. That's the part that will take me a little time to get to....
> Sorry to just tease you. ;)
> If nothing pops up as obvious, I'll try to get to it in a week or so.
No problem. I'll be here.
Keith
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-21 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-21 18:28 breakpoint setting bug Bruce Korb
2010-02-21 18:40 ` Keith Seitz
2010-02-21 19:09 ` Bruce Korb
2010-02-23 23:59 ` Keith Seitz
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).