From: Robert Lipe <robertl@sco.com>
To: Jason Merrill <jason@cygnus.com>
Cc: wilson@cygnus.com, egcs@cygnus.com
Subject: Re: dwarf2 debug dependent upon GAS?
Date: Thu, 25 Feb 1999 23:25:00 -0000 [thread overview]
Message-ID: <19990226012522.D17655@rjlhome.sco.com> (raw)
In-Reply-To: < u93e3tism2.fsf@yorick.cygnus.com >; from Jason Merrill on Thu, Feb 25, 1999 at 10:31:01PM -0800
> Actually, I think we should use ASM_{GENERATE,OUTPUT}_INTERNAL_LABEL to
> handle such matters, like we do for text_end_label (and as the comment in
> dwarfout.c suggests). That's a bit more complicated than this approach,
> but more correct.
This isn't quite right, but I'm calling it a night.
From the hip, my guess is that add_AT_section_offset() is calling
stripattributes() on that third argument which is no longer appropriate.
The bogus code looks like:
.ascii "/tmp/x.c\0" / DW_AT_name
.ascii "/home3/negcs/gcc\0" / DW_AT_comp_dir
.ascii "GNU C egcs-2.93.09 19990225 (gcc2 ss-980929 experimental)\0"
/ DW_AT_producer
.byte 0x1 / DW_AT_language
.4byte .Ltext_label0 / DW_AT_low_pc
.4byte .Letext0 / DW_AT_high_pc
-> .4byte *.Ldebug_line_label0 / DW_AT_stmt_list
.byte 0x2 / ULEB128 0x2 (DIE (0x6d) DW_TAG_subprogram)
.byte 0x1 / DW_AT_external
Remove the '*' from that line, and it compiles and links again.
Index: dwarf2out.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dwarf2out.c,v
retrieving revision 1.85
diff -u -p -r1.85 dwarf2out.c
--- dwarf2out.c 1999/02/24 17:48:42 1.85
+++ dwarf2out.c 1999/02/26 07:21:27
@@ -2624,7 +2624,23 @@ static unsigned lookup_filename PROTO((
#define BSS_SECTION ".bss"
#endif
+/* Labels we insert at beginning sections we can reference instead of
+ the section names themselves. */
+#ifndef TEXT_SECTION_LABEL
+#define TEXT_SECTION_LABEL "Ltext_label"
+#endif
+#ifndef DEBUG_LINE_SECTION_LABEL
+#define DEBUG_LINE_SECTION_LABEL "Ldebug_line_label"
+#endif
+#ifndef DEBUG_INFO_SECTION_LABEL
+#define DEBUG_INFO_SECTION_LABEL "Ldebug_info_label"
+#endif
+#ifndef ABBREV_SECTION_LABEL
+#define ABBREV_SECTION_LABEL "Ldebug_abbrev_label"
+#endif
+
+
/* Definitions of defaults for formats and names of various special
(artificial) labels which may be generated within this file (when the -g
options is used and DWARF_DEBUGGING_INFO is in effect.
@@ -2632,6 +2648,10 @@ static unsigned lookup_filename PROTO((
typically, overriding these defaults is unnecessary. */
static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES];
+static char text_section_label[MAX_ARTIFICIAL_LABEL_BYTES];
+static char abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES];
+static char debug_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES];
+static char debug_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES];
#ifndef TEXT_END_LABEL
#define TEXT_END_LABEL "Letext"
@@ -5423,7 +5443,7 @@ output_compilation_unit_header ()
fprintf (asm_out_file, "\t%s DWARF version number", ASM_COMMENT_START);
fputc ('\n', asm_out_file);
- ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (ABBREV_SECTION));
+ ASM_OUTPUT_DWARF_OFFSET (asm_out_file, abbrev_section_label);
if (flag_debug_asm)
fprintf (asm_out_file, "\t%s Offset Into Abbrev. Section",
ASM_COMMENT_START);
@@ -5496,7 +5516,7 @@ output_pubnames ()
fprintf (asm_out_file, "\t%s DWARF Version", ASM_COMMENT_START);
fputc ('\n', asm_out_file);
- ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (DEBUG_INFO_SECTION));
+ ASM_OUTPUT_DWARF_OFFSET (asm_out_file, debug_info_section_label);
if (flag_debug_asm)
fprintf (asm_out_file, "\t%s Offset of Compilation Unit Info.",
ASM_COMMENT_START);
@@ -5577,7 +5597,7 @@ output_aranges ()
fprintf (asm_out_file, "\t%s DWARF Version", ASM_COMMENT_START);
fputc ('\n', asm_out_file);
- ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (DEBUG_INFO_SECTION));
+ ASM_OUTPUT_DWARF_OFFSET (asm_out_file, debug_info_section_label);
if (flag_debug_asm)
fprintf (asm_out_file, "\t%s Offset of Compilation Unit Info.",
ASM_COMMENT_START);
@@ -5603,13 +5623,13 @@ output_aranges ()
ASM_COMMENT_START, 2 * PTR_SIZE);
fputc ('\n', asm_out_file);
- ASM_OUTPUT_DWARF_ADDR (asm_out_file, stripattributes (TEXT_SECTION));
+ ASM_OUTPUT_DWARF_ADDR (asm_out_file, text_section_label);
if (flag_debug_asm)
fprintf (asm_out_file, "\t%s Address", ASM_COMMENT_START);
fputc ('\n', asm_out_file);
ASM_OUTPUT_DWARF_ADDR_DELTA (asm_out_file, text_end_label,
- stripattributes (TEXT_SECTION));
+ text_section_label);
if (flag_debug_asm)
fprintf (asm_out_file, "%s Length", ASM_COMMENT_START);
@@ -5794,14 +5814,14 @@ output_line_info ()
fputc ('\n', asm_out_file);
ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address);
fputc ('\n', asm_out_file);
- ASM_OUTPUT_DWARF_ADDR (asm_out_file, stripattributes (TEXT_SECTION));
+ ASM_OUTPUT_DWARF_ADDR (asm_out_file, text_section_label);
fputc ('\n', asm_out_file);
/* Generate the line number to PC correspondence table, encoded as
a series of state machine operations. */
current_file = 1;
current_line = 1;
- strcpy (prev_line_label, stripattributes (TEXT_SECTION));
+ strcpy (prev_line_label, text_section_label);
for (lt_index = 1; lt_index < line_info_table_in_use; ++lt_index)
{
register dw_line_info_ref line_info;
@@ -9851,6 +9871,21 @@ dwarf2out_init (asm_out_file, main_input
gen_compile_unit_die (main_input_filename);
ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0);
+ ASM_GENERATE_INTERNAL_LABEL (abbrev_section_label, ABBREV_SECTION_LABEL, 0);
+ ASM_GENERATE_INTERNAL_LABEL (text_section_label, TEXT_SECTION_LABEL, 0);
+ ASM_GENERATE_INTERNAL_LABEL (debug_info_section_label,
+ DEBUG_INFO_SECTION_LABEL, 0);
+ ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label,
+ DEBUG_LINE_SECTION_LABEL, 0);
+
+ ASM_OUTPUT_SECTION (asm_out_file, ABBREV_SECTION);
+ ASM_OUTPUT_LABEL (asm_out_file, abbrev_section_label);
+ ASM_OUTPUT_SECTION (asm_out_file, TEXT_SECTION);
+ ASM_OUTPUT_LABEL (asm_out_file, text_section_label);
+ ASM_OUTPUT_SECTION (asm_out_file, DEBUG_INFO_SECTION);
+ ASM_OUTPUT_LABEL (asm_out_file, debug_info_section_label);
+ ASM_OUTPUT_SECTION (asm_out_file, DEBUG_LINE_SECTION);
+ ASM_OUTPUT_LABEL (asm_out_file, debug_line_section_label);
}
/* Output stuff that dwarf requires at the end of every file,
@@ -9918,12 +9953,11 @@ dwarf2out_finish ()
was in .text. */
if (separate_line_info_table_in_use == 0)
{
- add_AT_lbl_id (comp_unit_die, DW_AT_low_pc,
- stripattributes (TEXT_SECTION));
+ add_AT_lbl_id (comp_unit_die, DW_AT_low_pc, text_section_label);
add_AT_lbl_id (comp_unit_die, DW_AT_high_pc, text_end_label);
}
- add_AT_section_offset (comp_unit_die, DW_AT_stmt_list, DEBUG_LINE_SECTION);
+ add_AT_section_offset (comp_unit_die, DW_AT_stmt_list, debug_line_section_label);
}
/* Output the abbreviation table. */
WARNING: multiple messages have this Message-ID
From: Robert Lipe <robertl@sco.com>
To: Jason Merrill <jason@cygnus.com>
Cc: wilson@cygnus.com, egcs@cygnus.com
Subject: Re: dwarf2 debug dependent upon GAS?
Date: Sun, 28 Feb 1999 22:53:00 -0000 [thread overview]
Message-ID: <19990226012522.D17655@rjlhome.sco.com> (raw)
Message-ID: <19990228225300.cnf9tS6-4hjRMte0c5Uzog5HHxoJqsw1nTtmWir2Ojw@z> (raw)
In-Reply-To: <u93e3tism2.fsf@yorick.cygnus.com>
> Actually, I think we should use ASM_{GENERATE,OUTPUT}_INTERNAL_LABEL to
> handle such matters, like we do for text_end_label (and as the comment in
> dwarfout.c suggests). That's a bit more complicated than this approach,
> but more correct.
This isn't quite right, but I'm calling it a night.
next prev parent reply other threads:[~1999-02-25 23:25 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <19990221144644.M8783.cygnus.egcs@rjlhome.sco.com>
1999-02-22 17:24 ` Jim Wilson
[not found] ` < 199902230124.RAA24440@rtl.cygnus.com >
1999-02-22 21:32 ` Robert Lipe
[not found] ` < 19990222233200.P325@rjlhome.sco.com >
1999-02-23 7:04 ` Brian Ford
[not found] ` < Pine.SGI.4.03.9902230903340.512-100000@uscream.vss.fsi.com >
1999-02-23 8:41 ` Robert Lipe
[not found] ` < 19990223104109.E2294@rjlhome.sco.com >
1999-02-23 9:03 ` Brian Ford
1999-02-28 22:53 ` Brian Ford
1999-02-23 17:39 ` Daniel Berlin
1999-02-28 22:53 ` Daniel Berlin
1999-02-28 22:53 ` Robert Lipe
1999-02-28 22:53 ` Brian Ford
1999-02-23 14:19 ` Jim Wilson
1999-02-28 22:53 ` Jim Wilson
1999-02-28 22:53 ` Robert Lipe
1999-02-28 22:53 ` Jim Wilson
[not found] ` <199902230124.RAA24440.cygnus.egcs@rtl.cygnus.com>
1999-02-25 12:05 ` Jason Merrill
[not found] ` <19990225143649.I17655@rjlhome.sco.com>
1999-02-25 18:13 ` Jason Merrill
[not found] ` < u9u2w9j4jr.fsf@yorick.cygnus.com >
1999-02-25 20:55 ` Robert Lipe
1999-02-25 21:02 ` Jason Merrill
[not found] ` < u9d82xiwp5.fsf@yorick.cygnus.com >
1999-02-25 21:21 ` Robert Lipe
1999-02-25 21:27 ` Jason Merrill
1999-02-28 22:53 ` Jason Merrill
1999-02-28 22:53 ` Robert Lipe
1999-02-25 22:16 ` Robert Lipe
1999-02-25 22:31 ` Jason Merrill
[not found] ` < u93e3tism2.fsf@yorick.cygnus.com >
1999-02-25 23:25 ` Robert Lipe [this message]
[not found] ` < 19990226012522.D17655@rjlhome.sco.com >
1999-02-28 0:57 ` Jeffrey A Law
1999-02-28 22:53 ` Jeffrey A Law
1999-02-28 22:53 ` Robert Lipe
1999-02-28 22:53 ` Jason Merrill
1999-02-28 22:53 ` Robert Lipe
1999-02-28 22:53 ` Jason Merrill
1999-02-25 21:19 ` Jason Merrill
1999-02-28 22:53 ` Jason Merrill
1999-02-28 22:53 ` Robert Lipe
1999-02-28 22:53 ` Jason Merrill
1999-02-28 22:53 ` Jason Merrill
1999-02-21 12:47 Robert Lipe
[not found] ` < 19990221144644.M8783@rjlhome.sco.com >
1999-02-21 14:51 ` Jeffrey A Law
1999-02-28 22:53 ` Jeffrey A Law
1999-02-28 22:53 ` Robert Lipe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990226012522.D17655@rjlhome.sco.com \
--to=robertl@sco.com \
--cc=egcs@cygnus.com \
--cc=jason@cygnus.com \
--cc=wilson@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).