* RFA: dbxread patch
@ 2003-02-25 0:01 J. Johnston
2003-02-25 22:52 ` Jim Blandy
0 siblings, 1 reply; 5+ messages in thread
From: J. Johnston @ 2003-02-25 0:01 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
The following patch fixes a problem when the stabs debug info
for a file does not contain sline entries. This happens, for
example with the glibc syscall code which is generated assembler
code. In process_one_symbol in dbxread.c, a line 0 is recorded for the
end of the function. When there are no other line numbers, we end up finding this
line 0 as our alt_symtab in symtab:find_pc_sect_line() and we end up
subtracting one resulting in line -1. This problem manifests itself
when we attempt to break at the generated glibc functions such as
kill.
The patch changes process_one_symbol() to only record line 0 if sline info
has been found for the function.
Ok to commit?
-- Jeff J.
2003-02-24 Jeff Johnston <jjohnstn@redhat.com>
* dbxread.c (process_one_symbol): Only record line 0 if one or more sline
entries have been seen for the function.
[-- Attachment #2: dbxread.patch --]
[-- Type: text/plain, Size: 532 bytes --]
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.43
diff -u -r1.43 dbxread.c
--- dbxread.c 20 Feb 2003 18:31:14 -0000 1.43
+++ dbxread.c 24 Feb 2003 23:39:52 -0000
@@ -2831,7 +2831,9 @@
break;
}
- record_line (current_subfile, 0, last_function_start + valu);
+ if (sline_found_in_function)
+ record_line (current_subfile, 0, last_function_start + valu);
+
within_function = 0;
new = pop_context ();
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: dbxread patch
2003-02-25 0:01 RFA: dbxread patch J. Johnston
@ 2003-02-25 22:52 ` Jim Blandy
2003-02-25 23:17 ` J. Johnston
0 siblings, 1 reply; 5+ messages in thread
From: Jim Blandy @ 2003-02-25 22:52 UTC (permalink / raw)
To: J. Johnston; +Cc: gdb-patches
Yes, looks good.
Please add a comment briefly explaining why the check is needed
(hand-generated stabs that contain N_FUN stabs but no N_SLINE stabs).
Elena suggested the change, right? She should be credited in the
ChangeLog entry.
"J. Johnston" <jjohnstn@redhat.com> writes:
> The following patch fixes a problem when the stabs debug info
> for a file does not contain sline entries. This happens, for
> example with the glibc syscall code which is generated assembler
> code. In process_one_symbol in dbxread.c, a line 0 is recorded for the
> end of the function. When there are no other line numbers, we end up finding this
> line 0 as our alt_symtab in symtab:find_pc_sect_line() and we end up
> subtracting one resulting in line -1. This problem manifests itself
> when we attempt to break at the generated glibc functions such as
> kill.
>
> The patch changes process_one_symbol() to only record line 0 if sline info
> has been found for the function.
>
> Ok to commit?
>
> -- Jeff J.
>
>
> 2003-02-24 Jeff Johnston <jjohnstn@redhat.com>
>
> * dbxread.c (process_one_symbol): Only record line 0 if one or more sline
> entries have been seen for the function.
>
>
>
> Index: dbxread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dbxread.c,v
> retrieving revision 1.43
> diff -u -r1.43 dbxread.c
> --- dbxread.c 20 Feb 2003 18:31:14 -0000 1.43
> +++ dbxread.c 24 Feb 2003 23:39:52 -0000
> @@ -2831,7 +2831,9 @@
> break;
> }
>
> - record_line (current_subfile, 0, last_function_start + valu);
> + if (sline_found_in_function)
> + record_line (current_subfile, 0, last_function_start + valu);
> +
> within_function = 0;
> new = pop_context ();
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: dbxread patch
2003-02-25 22:52 ` Jim Blandy
@ 2003-02-25 23:17 ` J. Johnston
2003-02-26 21:12 ` Elena Zannoni
0 siblings, 1 reply; 5+ messages in thread
From: J. Johnston @ 2003-02-25 23:17 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
Jim Blandy wrote:
> Yes, looks good.
>
> Please add a comment briefly explaining why the check is needed
> (hand-generated stabs that contain N_FUN stabs but no N_SLINE stabs).
>
I have attached a new patch with a comment.
> Elena suggested the change, right? She should be credited in the
> ChangeLog entry.
>
You are correct - thanks for spotting this oversight.
2003-02-25 Jeff Johnston <jjohnstn@redhat.com>
From Elena Zannoni <ezannoni@redhat.com>
* dbxread.c (process_one_symbol): Only record line 0 if one or more sline
entries have been seen for the function.
Ok now?
-- Jeff J.
> "J. Johnston" <jjohnstn@redhat.com> writes:
>
>
>>The following patch fixes a problem when the stabs debug info
>>for a file does not contain sline entries. This happens, for
>>example with the glibc syscall code which is generated assembler
>>code. In process_one_symbol in dbxread.c, a line 0 is recorded for the
>>end of the function. When there are no other line numbers, we end up finding this
>>line 0 as our alt_symtab in symtab:find_pc_sect_line() and we end up
>>subtracting one resulting in line -1. This problem manifests itself
>>when we attempt to break at the generated glibc functions such as
>>kill.
>>
>>The patch changes process_one_symbol() to only record line 0 if sline info
>>has been found for the function.
>>
>>Ok to commit?
>>
>>-- Jeff J.
>>
>>
[-- Attachment #2: dbxread.patch --]
[-- Type: text/plain, Size: 754 bytes --]
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.43
diff -u -r1.43 dbxread.c
--- dbxread.c 20 Feb 2003 18:31:14 -0000 1.43
+++ dbxread.c 25 Feb 2003 23:12:07 -0000
@@ -2831,7 +2831,13 @@
break;
}
- record_line (current_subfile, 0, last_function_start + valu);
+ /* The following check is added before recording line 0 at
+ end of function so as to handle hand-generated stabs
+ which may have an N_FUN stabs at the end of the function, but
+ no N_SLINE stabs. */
+ if (sline_found_in_function)
+ record_line (current_subfile, 0, last_function_start + valu);
+
within_function = 0;
new = pop_context ();
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: dbxread patch
2003-02-25 23:17 ` J. Johnston
@ 2003-02-26 21:12 ` Elena Zannoni
2003-02-26 21:46 ` J. Johnston
0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2003-02-26 21:12 UTC (permalink / raw)
To: J. Johnston; +Cc: Jim Blandy, gdb-patches
J. Johnston writes:
> Jim Blandy wrote:
> > Yes, looks good.
> >
> > Please add a comment briefly explaining why the check is needed
> > (hand-generated stabs that contain N_FUN stabs but no N_SLINE stabs).
> >
>
> I have attached a new patch with a comment.
>
> > Elena suggested the change, right? She should be credited in the
> > ChangeLog entry.
> >
>
> You are correct - thanks for spotting this oversight.
>
> 2003-02-25 Jeff Johnston <jjohnstn@redhat.com>
>
> From Elena Zannoni <ezannoni@redhat.com>
> * dbxread.c (process_one_symbol): Only record line 0 if one or more sline
> entries have been seen for the function.
>
>
> Ok now?
Yes.
Elena
>
> -- Jeff J.
>
> > "J. Johnston" <jjohnstn@redhat.com> writes:
> >
> >
> >>The following patch fixes a problem when the stabs debug info
> >>for a file does not contain sline entries. This happens, for
> >>example with the glibc syscall code which is generated assembler
> >>code. In process_one_symbol in dbxread.c, a line 0 is recorded for the
> >>end of the function. When there are no other line numbers, we end up finding this
> >>line 0 as our alt_symtab in symtab:find_pc_sect_line() and we end up
> >>subtracting one resulting in line -1. This problem manifests itself
> >>when we attempt to break at the generated glibc functions such as
> >>kill.
> >>
> >>The patch changes process_one_symbol() to only record line 0 if sline info
> >>has been found for the function.
> >>
> >>Ok to commit?
> >>
> >>-- Jeff J.
> >>
> >>
> Index: dbxread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dbxread.c,v
> retrieving revision 1.43
> diff -u -r1.43 dbxread.c
> --- dbxread.c 20 Feb 2003 18:31:14 -0000 1.43
> +++ dbxread.c 25 Feb 2003 23:12:07 -0000
> @@ -2831,7 +2831,13 @@
> break;
> }
>
> - record_line (current_subfile, 0, last_function_start + valu);
> + /* The following check is added before recording line 0 at
> + end of function so as to handle hand-generated stabs
> + which may have an N_FUN stabs at the end of the function, but
> + no N_SLINE stabs. */
> + if (sline_found_in_function)
> + record_line (current_subfile, 0, last_function_start + valu);
> +
> within_function = 0;
> new = pop_context ();
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: dbxread patch
2003-02-26 21:12 ` Elena Zannoni
@ 2003-02-26 21:46 ` J. Johnston
0 siblings, 0 replies; 5+ messages in thread
From: J. Johnston @ 2003-02-26 21:46 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Jim Blandy, gdb-patches
Patch applied. Thanks.
Elena Zannoni wrote:
> J. Johnston writes:
> > Jim Blandy wrote:
> > > Yes, looks good.
> > >
> > > Please add a comment briefly explaining why the check is needed
> > > (hand-generated stabs that contain N_FUN stabs but no N_SLINE stabs).
> > >
> >
> > I have attached a new patch with a comment.
> >
> > > Elena suggested the change, right? She should be credited in the
> > > ChangeLog entry.
> > >
> >
> > You are correct - thanks for spotting this oversight.
> >
> > 2003-02-25 Jeff Johnston <jjohnstn@redhat.com>
> >
> > From Elena Zannoni <ezannoni@redhat.com>
> > * dbxread.c (process_one_symbol): Only record line 0 if one or more sline
> > entries have been seen for the function.
> >
> >
> > Ok now?
>
>
> Yes.
> Elena
>
>
> >
> > -- Jeff J.
> >
> > > "J. Johnston" <jjohnstn@redhat.com> writes:
> > >
> > >
> > >>The following patch fixes a problem when the stabs debug info
> > >>for a file does not contain sline entries. This happens, for
> > >>example with the glibc syscall code which is generated assembler
> > >>code. In process_one_symbol in dbxread.c, a line 0 is recorded for the
> > >>end of the function. When there are no other line numbers, we end up finding this
> > >>line 0 as our alt_symtab in symtab:find_pc_sect_line() and we end up
> > >>subtracting one resulting in line -1. This problem manifests itself
> > >>when we attempt to break at the generated glibc functions such as
> > >>kill.
> > >>
> > >>The patch changes process_one_symbol() to only record line 0 if sline info
> > >>has been found for the function.
> > >>
> > >>Ok to commit?
> > >>
> > >>-- Jeff J.
> > >>
> > >>
> > Index: dbxread.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/dbxread.c,v
> > retrieving revision 1.43
> > diff -u -r1.43 dbxread.c
> > --- dbxread.c 20 Feb 2003 18:31:14 -0000 1.43
> > +++ dbxread.c 25 Feb 2003 23:12:07 -0000
> > @@ -2831,7 +2831,13 @@
> > break;
> > }
> >
> > - record_line (current_subfile, 0, last_function_start + valu);
> > + /* The following check is added before recording line 0 at
> > + end of function so as to handle hand-generated stabs
> > + which may have an N_FUN stabs at the end of the function, but
> > + no N_SLINE stabs. */
> > + if (sline_found_in_function)
> > + record_line (current_subfile, 0, last_function_start + valu);
> > +
> > within_function = 0;
> > new = pop_context ();
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-26 21:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-25 0:01 RFA: dbxread patch J. Johnston
2003-02-25 22:52 ` Jim Blandy
2003-02-25 23:17 ` J. Johnston
2003-02-26 21:12 ` Elena Zannoni
2003-02-26 21:46 ` J. Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox