Revert previous commit.
This commit is contained in:
parent
e12af5a2d1
commit
d551e57bf7
|
@ -1,10 +1,3 @@
|
||||||
2009-07-28 Pedro Alves <pedro@codesourcery.com>
|
|
||||||
|
|
||||||
* bfd-target.c (target_bfd_xclose): Only close the bfd if the
|
|
||||||
section tarble is not empty.
|
|
||||||
(target_bfd_reopen): If the section table ends up empty, close the
|
|
||||||
bfd here.
|
|
||||||
|
|
||||||
2009-07-28 Aleksandar Ristovski <aristovski@qnx.com>
|
2009-07-28 Aleksandar Ristovski <aristovski@qnx.com>
|
||||||
|
|
||||||
* nto-tdep.c (nto_thread_state_str): New array.
|
* nto-tdep.c (nto_thread_state_str): New array.
|
||||||
|
|
|
@ -54,10 +54,7 @@ static void
|
||||||
target_bfd_xclose (struct target_ops *t, int quitting)
|
target_bfd_xclose (struct target_ops *t, int quitting)
|
||||||
{
|
{
|
||||||
struct target_section_table *table = t->to_data;
|
struct target_section_table *table = t->to_data;
|
||||||
|
if (table->sections)
|
||||||
/* If the target sections table is empty, the bfd had already been
|
|
||||||
closed. */
|
|
||||||
if (table->sections != table->sections_end)
|
|
||||||
bfd_close (table->sections->bfd);
|
bfd_close (table->sections->bfd);
|
||||||
xfree (table->sections);
|
xfree (table->sections);
|
||||||
xfree (table);
|
xfree (table);
|
||||||
|
@ -73,12 +70,6 @@ target_bfd_reopen (struct bfd *bfd)
|
||||||
table = XZALLOC (struct target_section_table);
|
table = XZALLOC (struct target_section_table);
|
||||||
build_section_table (bfd, &table->sections, &table->sections_end);
|
build_section_table (bfd, &table->sections, &table->sections_end);
|
||||||
|
|
||||||
/* No use keeping the bfd open if there are no target sections we
|
|
||||||
care about. This way, we avoid keeping the bfd pointer stored
|
|
||||||
somewhere so that target_bfd_xclose could use it. */
|
|
||||||
if (table->sections == table->sections_end)
|
|
||||||
bfd_close (bfd);
|
|
||||||
|
|
||||||
t = XZALLOC (struct target_ops);
|
t = XZALLOC (struct target_ops);
|
||||||
t->to_shortname = "bfd";
|
t->to_shortname = "bfd";
|
||||||
t->to_longname = _("BFD backed target");
|
t->to_longname = _("BFD backed target");
|
||||||
|
|
Loading…
Reference in New Issue