Code cleanup: Add objfile_name accessor
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 68921b05dfd40ec2cc1df33285ffc38ae5bbe9e7..751cd2b797f092d571a708761c9aed3a1f367444 100644 (file)
@@ -1151,8 +1151,8 @@ sym_info (char *arg, int from_tty)
           a pagination request inside printf_filtered.  */
        old_chain = make_cleanup (xfree, loc_string);
 
-       gdb_assert (osect->objfile && osect->objfile->name);
-       obj_name = osect->objfile->name;
+       gdb_assert (osect->objfile && objfile_name (osect->objfile));
+       obj_name = objfile_name (osect->objfile);
 
        if (MULTI_OBJFILE_P ())
          if (pc_in_unmapped_range (addr, osect))
@@ -1383,7 +1383,7 @@ address_info (char *exp, int from_tty)
              printf_filtered (_("a thread-local variable at offset %s "
                                 "in the thread-local storage for `%s'"),
                               paddress (gdbarch, load_addr),
-                              section->objfile->name);
+                              objfile_name (section->objfile));
            else
              {
                printf_filtered (_("static storage at address "));
This page took 0.054329 seconds and 4 git commands to generate.