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
22c4957e
Commit
22c4957e
authored
Apr 27, 1998
by
Michael Meissner
Committed by
Michael Meissner
Apr 27, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redefine abort to report linenumber and filename of the error
From-SVN: r19423
parent
563c063f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
gcc/.gdbinit
+5
-0
gcc/ChangeLog
+6
-0
gcc/system.h
+29
-0
No files found.
gcc/.gdbinit
View file @
22c4957e
...
@@ -90,6 +90,11 @@ end
...
@@ -90,6 +90,11 @@ end
# stdio stop working and therefore the `pr' command below as well.
# stdio stop working and therefore the `pr' command below as well.
b abort
b abort
# Put breakpoints at exit and fancy_abort in case abort is mapped
# to either fprintf/exit or fancy_abort.
b exit
b fancy_abort
# Make gdb complain about symbol reading errors. This is so that gcc
# Make gdb complain about symbol reading errors. This is so that gcc
# developers can see and fix bugs in gcc debug output.
# developers can see and fix bugs in gcc debug output.
set complaints 20
set complaints 20
gcc/ChangeLog
View file @
22c4957e
Mon Apr 27 08:55:23 1998 Michael Meissner <meissner@cygnus.com>
Mon Apr 27 08:55:23 1998 Michael Meissner <meissner@cygnus.com>
* system.h (abort): If abort is not defined, and neither is
USE_SYSTEM_ABORT, redefine abort to call fprintf and exit,
reporting the line and filename of the error.
* .gdbinit: Add breakpoints on exit and fancy_abort.
* final.c (split_double): Avoid a compiler warning if
* final.c (split_double): Avoid a compiler warning if
BITS_PER_WORD is less than or equal to HOST_BIT_PER_WIDE_INT.
BITS_PER_WORD is less than or equal to HOST_BIT_PER_WIDE_INT.
...
...
gcc/system.h
View file @
22c4957e
...
@@ -188,4 +188,33 @@ extern void free ();
...
@@ -188,4 +188,33 @@ extern void free ();
extern
char
*
getenv
();
extern
char
*
getenv
();
#endif
#endif
/* Redefine abort to report an internal error w/o coredump, and reporting the
location of the error in the source file. */
#ifndef abort
#ifndef __STDC__
#ifndef __GNUC__
#ifndef USE_SYSTEM_ABORT
#define USE_SYSTEM_ABORT
#endif
/* !USE_SYSTEM_ABORT */
#endif
/* !__GNUC__ */
#endif
/* !__STDC__ */
#ifndef USE_SYSTEM_ABORT
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
#define abort() \
(fprintf (stderr, \
"%s:%d: Internal compiler error\n", __FILE__, __LINE__), \
exit (FATAL_EXIT_CODE))
#else
#define abort() \
(fprintf (stderr, \
"%s:%d: Internal compiler error in function %s\n", \
__FILE__, __LINE__, __PRETTY_FUNCTION__), \
exit (FATAL_EXIT_CODE))
#endif
/* recent gcc */
#endif
/* !USE_SYSTEM_ABORT */
#endif
/* !abort */
#endif
/* __GCC_SYSTEM_H__ */
#endif
/* __GCC_SYSTEM_H__ */
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