diff options
author | David Carlton <carlton@bactrian.org> | 2003-02-04 21:55:26 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-02-04 21:55:26 +0000 |
commit | eb9a305d4006fa2ca1e22add3bfe7abd48a9f56c (patch) | |
tree | f0d642c0aa41ded54e147175466d0e382a1bd9e9 /gdb/objfiles.c | |
parent | 406fc7fbebc6e4493f0fc348c434d01c7bde2d9b (diff) | |
download | gdb-eb9a305d4006fa2ca1e22add3bfe7abd48a9f56c.zip gdb-eb9a305d4006fa2ca1e22add3bfe7abd48a9f56c.tar.gz gdb-eb9a305d4006fa2ca1e22add3bfe7abd48a9f56c.tar.bz2 |
2003-02-04 David Carlton <carlton@math.stanford.edu>
* objfiles.c (allocate_objfile): Always set name. Add comment at
start of function.
* jv-lang.c (get_dynamics_objfile): Add comment.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 9084401..dd4ef62 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -150,6 +150,15 @@ build_objfile_section_table (struct objfile *objfile) OBJF_SHARED are simply copied through to the new objfile flags member. */ +/* NOTE: carlton/2003-02-04: This function is called with args NULL, 0 + by jv-lang.c, to create an artificial objfile used to hold + information about dynamically-loaded Java classes. Unfortunately, + that branch of this function doesn't get tested very frequently, so + it's prone to breakage. (E.g. at one time the name was set to NULL + in that situation, which broke a loop over all names in the dynamic + library loader.) If you change this function, please try to leave + things in a consistent state even if abfd is NULL. */ + struct objfile * allocate_objfile (bfd *abfd, int flags) { @@ -313,6 +322,10 @@ allocate_objfile (bfd *abfd, int flags) objfile->name, bfd_errmsg (bfd_get_error ())); } } + else + { + objfile->name = "<<anonymous objfile>>"; + } /* Initialize the section indexes for this objfile, so that we can later detect if they are used w/o being properly assigned to. */ |