Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
136bfcb3
Commit
136bfcb3
authored
Sep 02, 1994
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for -gstabs on SVR4 configurations.
From-SVN: r8017
parent
a89b2cc4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
28 deletions
+60
-28
gcc/config/sparc/sol2.h
+1
-27
gcc/config/sparc/sysv4.h
+1
-1
gcc/config/svr4.h
+58
-0
No files found.
gcc/config/sparc/sol2.h
View file @
136bfcb3
...
@@ -51,21 +51,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
...
@@ -51,21 +51,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* We use stabs-in-elf for debugging, because that is what the native
/* We use stabs-in-elf for debugging, because that is what the native
toolchain uses. */
toolchain uses. */
#
define DBX_DEBUGGING_INFO
#
undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#define DBX_BLOCKS_FUNCTION_RELATIVE 1
/* "gcc2_compiled." must be a .stabs, not an ordinary symbol, or GDB won't
see it. Furthermore, since GDB reads the input piecemeal, starting
with each N_SO, it's a lot easier if the gcc2 flag symbol is *after*
the N_SO rather than before it. So we emit an N_OPT stab here. */
#define ASM_IDENTIFY_GCC(FILE)
/* Do nothing */
#define ASM_IDENTIFY_GCC_AFTER_SOURCE(FILE) \
fputs ("\t.stabs\t\"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE)
/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
#undef ASM_OUTPUT_SKIP
#undef ASM_OUTPUT_SKIP
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
...
@@ -106,20 +94,6 @@ do { \
...
@@ -106,20 +94,6 @@ do { \
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
/* in Solaris 2.0, linenos are relative to the current fn. */
#undef ASM_OUTPUT_SOURCE_LINE
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
{ static int sym_lineno = 1; \
fprintf (file, ".stabn 68,0,%d,.LM%d-%s\n.LM%d:\n", \
line, sym_lineno, \
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0), \
sym_lineno); \
sym_lineno += 1; }
/* But, to make this work, we have to output the stabs for the function
name *first*... */
#define DBX_FUNCTION_FIRST
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
We don't use the standard LIB_SPEC only because we don't yet support c++ */
We don't use the standard LIB_SPEC only because we don't yet support c++ */
...
...
gcc/config/sparc/sysv4.h
View file @
136bfcb3
...
@@ -24,8 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
...
@@ -24,8 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Undefine some symbols which are defined in "sparc.h" but which are
/* Undefine some symbols which are defined in "sparc.h" but which are
appropriate only for SunOS 4.x, and not for svr4. */
appropriate only for SunOS 4.x, and not for svr4. */
#undef DBX_DEBUGGING_INFO
#undef WORD_SWITCH_TAKES_ARG
#undef WORD_SWITCH_TAKES_ARG
#undef ASM_OUTPUT_SOURCE_LINE
#undef SELECT_SECTION
#undef SELECT_SECTION
#undef ASM_DECLARE_FUNCTION_NAME
#undef ASM_DECLARE_FUNCTION_NAME
#undef TEXT_SECTION_ASM_OP
#undef TEXT_SECTION_ASM_OP
...
...
gcc/config/svr4.h
View file @
136bfcb3
...
@@ -244,6 +244,64 @@ do { \
...
@@ -244,6 +244,64 @@ do { \
#undef DBX_REGISTER_NUMBER
#undef DBX_REGISTER_NUMBER
/* gas on SVR4 supports the use of .stabs. Permit -gstabs to be used
in general, although it will only work when using gas. */
#define DBX_DEBUGGING_INFO
/* Use DWARF debugging info by default. */
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
/* Make LBRAC and RBRAC addresses relative to the start of the
function. The native Solaris stabs debugging format works this
way, gdb expects it, and it reduces the number of relocation
entries. */
#define DBX_BLOCKS_FUNCTION_RELATIVE 1
/* When using stabs, gcc2_compiled must be a stabs entry, not an
ordinary symbol, or gdb won't see it. Furthermore, since gdb reads
the input piecemeal, starting with each N_SO, it's a lot easier if
the gcc2 flag symbol is *after* the N_SO rather than before it. So
we emit an N_OPT stab there. */
#define ASM_IDENTIFY_GCC(FILE) \
do \
{ \
if (write_symbols != DBX_DEBUG) \
fputs ("gcc2_compiled.:\n", FILE); \
} \
while (0)
#define ASM_IDENTIFY_GCC_AFTER_SOURCE(FILE) \
do \
{ \
if (write_symbols == DBX_DEBUG) \
fputs ("\t.stabs\t\"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE); \
} \
while (0)
/* Like block addresses, stabs line numbers are relative to the
current function. */
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
do \
{ \
static int sym_lineno = 1; \
fprintf (file, ".stabn 68,0,%d,.LM%d-%s\n.LM%d:\n", \
line, sym_lineno, \
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0), \
sym_lineno); \
sym_lineno += 1; \
} \
while (0)
/* In order for relative line numbers to work, we must output the
stabs entry for the function name first. */
#define DBX_FUNCTION_FIRST
/* Define the actual types of some ANSI-mandated types. (These
/* Define the actual types of some ANSI-mandated types. (These
definitions should work for most SVR4 systems). */
definitions should work for most SVR4 systems). */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment