aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-20 16:15:14 -0600
committerTom Tromey <tom@tromey.com>2018-07-16 08:55:20 -0600
commitccdac490bb3b568e88626afc84017c79e2d086e7 (patch)
treeadf27344c840b81fc8b9fa735b4fe2e27ad203f5 /gdb/buildsym.c
parent43130d6f969cebcd407e210fd06e565647401ba9 (diff)
downloadfsf-binutils-gdb-ccdac490bb3b568e88626afc84017c79e2d086e7.zip
fsf-binutils-gdb-ccdac490bb3b568e88626afc84017c79e2d086e7.tar.gz
fsf-binutils-gdb-ccdac490bb3b568e88626afc84017c79e2d086e7.tar.bz2
Use gdb_assert in two places in buildsym.c
This changes buildsym.c to use gdb_assert rather than internal_error in a couple of spots. gdb/ChangeLog 2018-07-16 Tom Tromey <tom@tromey.com> * buildsym.c (push_subfile): Use gdb_assert. (pop_subfile): Use gdb_assert.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index d1e47c3..6db07ce 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -891,11 +891,7 @@ push_subfile (void)
tem->next = subfile_stack;
subfile_stack = tem;
- if (current_subfile == NULL || current_subfile->name == NULL)
- {
- internal_error (__FILE__, __LINE__,
- _("failed internal consistency check"));
- }
+ gdb_assert (current_subfile != NULL && current_subfile->name != NULL);
tem->name = current_subfile->name;
}
@@ -905,11 +901,7 @@ pop_subfile (void)
char *name;
struct subfile_stack *link = subfile_stack;
- if (link == NULL)
- {
- internal_error (__FILE__, __LINE__,
- _("failed internal consistency check"));
- }
+ gdb_assert (link != NULL);
name = link->name;
subfile_stack = link->next;
xfree ((void *) link);