Patchwork [FYI] gdb: Handle missing domain types in: maintenance print psymbols

login
register
mail settings
Submitter Andrew Burgess
Date Sept. 3, 2019, 9:34 p.m.
Message ID <20190903213405.22403-1-andrew.burgess@embecosm.com>
Download mbox | patch
Permalink /patch/34379/
State New
Headers show

Comments

Andrew Burgess - Sept. 3, 2019, 9:34 p.m.
Some domain_enum values were not handled in print_partial_symbols
which means that 'maintenance print psymbols' would print '<invalid
domain>' when it shouldn't have.

gdb/ChangeLog:

	* psymtab.c (print_partial_symbols): Handle missing domain_enum
	values MODULE_DOMAIN and COMMON_BLOCK_DOMAIN.
---
 gdb/ChangeLog | 5 +++++
 gdb/psymtab.c | 6 ++++++
 2 files changed, 11 insertions(+)

Patch

diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 6cc7566580a..6f9bf7268f5 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -853,9 +853,15 @@  print_partial_symbols (struct gdbarch *gdbarch, struct objfile *objfile,
 	case STRUCT_DOMAIN:
 	  fputs_filtered ("struct domain, ", outfile);
 	  break;
+	case MODULE_DOMAIN:
+	  fputs_filtered ("module domain, ", outfile);
+	  break;
 	case LABEL_DOMAIN:
 	  fputs_filtered ("label domain, ", outfile);
 	  break;
+	case COMMON_BLOCK_DOMAIN:
+	  fputs_filtered ("common block domain, ", outfile);
+	  break;
 	default:
 	  fputs_filtered ("<invalid domain>, ", outfile);
 	  break;