diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-13 21:56:58 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-13 21:56:58 +0000 |
commit | 05c547f629815fdd47930f9645269ea71c32373f (patch) | |
tree | 954ca2983fa8e8dcabf843dbdc9de85e05824dba /gdb/gdbarch.c | |
parent | 1c4d3f96872d3ecb99c14c102ab3f55af8998676 (diff) | |
download | gdb-05c547f629815fdd47930f9645269ea71c32373f.zip gdb-05c547f629815fdd47930f9645269ea71c32373f.tar.gz gdb-05c547f629815fdd47930f9645269ea71c32373f.tar.bz2 |
2010-05-13 Michael Snyder <msnyder@vmware.com>
* gdbarch.sh: White space, add blank lines.
* arch-utils.c: Ditto.
* gdbarch.c: Regenerate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index ea35fa3..626a9db 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -511,6 +511,7 @@ void * gdbarch_obstack_zalloc (struct gdbarch *arch, long size) { void *data = obstack_alloc (arch->obstack, size); + memset (data, 0, size); return data; } @@ -526,6 +527,7 @@ void gdbarch_free (struct gdbarch *arch) { struct obstack *obstack; + gdb_assert (arch != NULL); gdb_assert (!arch->initialized_p); obstack = arch->obstack; @@ -543,6 +545,7 @@ verify_gdbarch (struct gdbarch *gdbarch) struct cleanup *cleanups; long length; char *buf; + log = mem_fileopen (); cleanups = make_cleanup_ui_file_delete (log); /* fundamental */ @@ -698,6 +701,7 @@ void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) { const char *gdb_nm_file = "<not-defined>"; + #if defined (GDB_NM_FILE) gdb_nm_file = GDB_NM_FILE; #endif @@ -3710,7 +3714,8 @@ gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, gdbarch_data_post_init_ftype *post_init) { struct gdbarch_data_registration **curr; - /* Append the new registraration. */ + + /* Append the new registration. */ for (curr = &gdbarch_data_registry.registrations; (*curr) != NULL; curr = &(*curr)->next); @@ -3829,6 +3834,7 @@ gdbarch_printable_names (void) int nr_arches = 0; const char **arches = NULL; struct gdbarch_registration *rego; + for (rego = gdbarch_registry; rego != NULL; rego = rego->next) @@ -3857,6 +3863,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture, { struct gdbarch_registration **curr; const struct bfd_arch_info *bfd_arch_info; + /* Check that BFD recognizes this architecture */ bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); if (bfd_arch_info == NULL) |