* RFA: remember dwarf_line_size
@ 2002-05-09 16:31 Jim Blandy
2002-05-09 20:08 ` Andrew Cagney
2002-05-10 10:00 ` Jim Blandy
0 siblings, 2 replies; 4+ messages in thread
From: Jim Blandy @ 2002-05-09 16:31 UTC (permalink / raw)
To: gdb-patches
The change I committed May 6 to dwarf2read.c introduced the new
function dwarf_decode_line_header. That contained a bunch of
consistency checks which assumed that dwarf_line_size is actually
preserved between the partial symbol scan and the full symbol read.
It isn't.
This patch should fix the following failures under -gdwarf-2:
FAIL: gdb.base/shlib-call.exp: (timeout) print shr1(g)
ERROR: Couldn't send break shr2 to GDB.
UNRESOLVED: gdb.base/shlib-call.exp: breakpoint function shr2
ERROR: Couldn't send continue to GDB.
UNRESOLVED: gdb.base/shlib-call.exp: run until breakpoint set at a function
FAIL: gdb.base/shlib-call.exp: (timeout) print shr1(1) 2nd time
FAIL: gdb.base/shlib-call.exp: (timeout) print mainshr1(1) from shlib func
FAIL: gdb.base/shlib-call.exp: step inside shr2 (shlib func) (timeout)
FAIL: gdb.base/shlib-call.exp: step out of shr2 to main (timeout)
FAIL: gdb.base/shlib-call.exp: (timeout) print mainshr1(1) from main
FAIL: gdb.base/shlib-call.exp: step into mainshr1 (timeout)
2002-05-09 Jim Blandy <jimb@redhat.com>
Properly track the size of the current objfile's .debug_line section.
* dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size.
(DWARF_LINE_SIZE): New macro.
(dwarf2_build_psymtabs_hard): Record the line section's size in
the partial symbol table.
(psymtab_to_symtab_1): Restore dwarf_line_size from the partial
symbol table.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.54.2.1
diff -c -c -b -F'^(' -r1.54.2.1 dwarf2read.c
*** dwarf2read.c 9 May 2002 20:03:36 -0000 1.54.2.1
--- dwarf2read.c 9 May 2002 23:24:22 -0000
***************
*** 434,439 ****
--- 434,443 ----
char *dwarf_line_buffer;
+ /* Size of dwarf_line_buffer, in bytes. */
+
+ unsigned int dwarf_line_size;
+
/* Pointer to start of dwarf string buffer for the objfile. */
char *dwarf_str_buffer;
***************
*** 458,463 ****
--- 462,468 ----
#define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer)
#define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size)
#define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer)
+ #define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size)
#define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer)
#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size)
#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer)
***************
*** 1222,1227 ****
--- 1227,1233 ----
DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer;
DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size;
DWARF_LINE_BUFFER (pst) = dwarf_line_buffer;
+ DWARF_LINE_SIZE (pst) = dwarf_line_size;
DWARF_STR_BUFFER (pst) = dwarf_str_buffer;
DWARF_STR_SIZE (pst) = dwarf_str_size;
DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer;
***************
*** 1525,1530 ****
--- 1531,1537 ----
dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst);
dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst);
dwarf_line_buffer = DWARF_LINE_BUFFER (pst);
+ dwarf_line_size = DWARF_LINE_SIZE (pst);
dwarf_str_buffer = DWARF_STR_BUFFER (pst);
dwarf_str_size = DWARF_STR_SIZE (pst);
dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: RFA: remember dwarf_line_size
2002-05-09 16:31 RFA: remember dwarf_line_size Jim Blandy
@ 2002-05-09 20:08 ` Andrew Cagney
2002-05-09 20:45 ` Jim Blandy
2002-05-10 10:00 ` Jim Blandy
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-05-09 20:08 UTC (permalink / raw)
To: Jim Blandy, gdb-patches
> The change I committed May 6 to dwarf2read.c introduced the new
> function dwarf_decode_line_header. That contained a bunch of
> consistency checks which assumed that dwarf_line_size is actually
> preserved between the partial symbol scan and the full symbol read.
> It isn't.
BTW,
> #define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer)
> #define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size)
> #define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer)
> + #define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size)
> #define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer)
> #define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size)
> #define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer)
I'm wondering if we even need these macros.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFA: remember dwarf_line_size
2002-05-09 20:08 ` Andrew Cagney
@ 2002-05-09 20:45 ` Jim Blandy
0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2002-05-09 20:45 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
Andrew Cagney <ac131313@cygnus.com> writes:
> > The change I committed May 6 to dwarf2read.c introduced the new
> > function dwarf_decode_line_header. That contained a bunch of
> > consistency checks which assumed that dwarf_line_size is actually
> > preserved between the partial symbol scan and the full symbol read.
> > It isn't.
>
> BTW,
>
> > #define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer)
> > #define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size)
> > #define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer)
> > + #define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size)
> > #define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer)
> > #define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size)
> > #define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer)
>
> I'm wondering if we even need these macros.
It's true --- they're only used in contexts where one could just as
easily put PST_PRIVATE (p) in a variable and access the fields
directly. I'd welcome a patch, if you wanted.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFA: remember dwarf_line_size
2002-05-09 16:31 RFA: remember dwarf_line_size Jim Blandy
2002-05-09 20:08 ` Andrew Cagney
@ 2002-05-10 10:00 ` Jim Blandy
1 sibling, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2002-05-10 10:00 UTC (permalink / raw)
To: gdb-patches
I'm going to commit this change now, to avoid disturbing Michael's
Sunday Project. A few folks have looked at it, and nobody squawked.
Jim Blandy <jimb@redhat.com> writes:
> The change I committed May 6 to dwarf2read.c introduced the new
> function dwarf_decode_line_header. That contained a bunch of
> consistency checks which assumed that dwarf_line_size is actually
> preserved between the partial symbol scan and the full symbol read.
> It isn't.
>
> This patch should fix the following failures under -gdwarf-2:
>
> FAIL: gdb.base/shlib-call.exp: (timeout) print shr1(g)
> ERROR: Couldn't send break shr2 to GDB.
> UNRESOLVED: gdb.base/shlib-call.exp: breakpoint function shr2
> ERROR: Couldn't send continue to GDB.
> UNRESOLVED: gdb.base/shlib-call.exp: run until breakpoint set at a function
> FAIL: gdb.base/shlib-call.exp: (timeout) print shr1(1) 2nd time
> FAIL: gdb.base/shlib-call.exp: (timeout) print mainshr1(1) from shlib func
> FAIL: gdb.base/shlib-call.exp: step inside shr2 (shlib func) (timeout)
> FAIL: gdb.base/shlib-call.exp: step out of shr2 to main (timeout)
> FAIL: gdb.base/shlib-call.exp: (timeout) print mainshr1(1) from main
> FAIL: gdb.base/shlib-call.exp: step into mainshr1 (timeout)
>
>
> 2002-05-09 Jim Blandy <jimb@redhat.com>
>
> Properly track the size of the current objfile's .debug_line section.
> * dwarf2read.c (struct dwarf2_pinfo): New member: dwarf_line_size.
> (DWARF_LINE_SIZE): New macro.
> (dwarf2_build_psymtabs_hard): Record the line section's size in
> the partial symbol table.
> (psymtab_to_symtab_1): Restore dwarf_line_size from the partial
> symbol table.
>
> Index: dwarf2read.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dwarf2read.c,v
> retrieving revision 1.54.2.1
> diff -c -c -b -F'^(' -r1.54.2.1 dwarf2read.c
> *** dwarf2read.c 9 May 2002 20:03:36 -0000 1.54.2.1
> --- dwarf2read.c 9 May 2002 23:24:22 -0000
> ***************
> *** 434,439 ****
> --- 434,443 ----
>
> char *dwarf_line_buffer;
>
> + /* Size of dwarf_line_buffer, in bytes. */
> +
> + unsigned int dwarf_line_size;
> +
> /* Pointer to start of dwarf string buffer for the objfile. */
>
> char *dwarf_str_buffer;
> ***************
> *** 458,463 ****
> --- 462,468 ----
> #define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer)
> #define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size)
> #define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer)
> + #define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size)
> #define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer)
> #define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size)
> #define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer)
> ***************
> *** 1222,1227 ****
> --- 1227,1233 ----
> DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer;
> DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size;
> DWARF_LINE_BUFFER (pst) = dwarf_line_buffer;
> + DWARF_LINE_SIZE (pst) = dwarf_line_size;
> DWARF_STR_BUFFER (pst) = dwarf_str_buffer;
> DWARF_STR_SIZE (pst) = dwarf_str_size;
> DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer;
> ***************
> *** 1525,1530 ****
> --- 1531,1537 ----
> dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst);
> dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst);
> dwarf_line_buffer = DWARF_LINE_BUFFER (pst);
> + dwarf_line_size = DWARF_LINE_SIZE (pst);
> dwarf_str_buffer = DWARF_STR_BUFFER (pst);
> dwarf_str_size = DWARF_STR_SIZE (pst);
> dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-10 17:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-09 16:31 RFA: remember dwarf_line_size Jim Blandy
2002-05-09 20:08 ` Andrew Cagney
2002-05-09 20:45 ` Jim Blandy
2002-05-10 10:00 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox