gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 3 Feb 2013 16:05:09 +0000 (16:05 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 3 Feb 2013 16:05:09 +0000 (16:05 +0000)
* tui/tui-data.c (init_win_info, tui_del_window, tui_free_window):
Rename field reference filename to fullname.
* tui/tui-data.h (struct tui_source_info): Rename field filename to
fullname.  New comment for it.
* tui/tui-source.c (tui_set_source_content): Rename field reference
filename to fullname.  Initialize field by symtab_to_fullname now.
* tui/tui-winsource.c (tui_update_breakpoint_info): Rename field
reference filename to fullname.  Use symtab_to_fullname during
comparison.

gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-source.c
gdb/tui/tui-winsource.c

index 2b3899fe191fcda2bee8063d7a25a9bfae220a41..793188aa53fb7559f029e2cf6c5f3349d423513a 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * tui/tui-data.c (init_win_info, tui_del_window, tui_free_window):
+       Rename field reference filename to fullname.
+       * tui/tui-data.h (struct tui_source_info): Rename field filename to
+       fullname.  New comment for it.
+       * tui/tui-source.c (tui_set_source_content): Rename field reference
+       filename to fullname.  Initialize field by symtab_to_fullname now.
+       * tui/tui-winsource.c (tui_update_breakpoint_info): Rename field
+       reference filename to fullname.  Use symtab_to_fullname during
+       comparison.
+
 2013-02-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Code cleanup.
index 8989578b8260fa39740b8a8d402d622022fe0544..609e78ec952345b789a71ddc23ef38e847202ce6 100644 (file)
@@ -541,7 +541,7 @@ init_win_info (struct tui_win_info *win_info)
       win_info->detail.source_info.gdbarch = NULL;
       win_info->detail.source_info.start_line_or_addr.loa = LOA_ADDRESS;
       win_info->detail.source_info.start_line_or_addr.u.addr = 0;
-      win_info->detail.source_info.filename = 0;
+      win_info->detail.source_info.fullname = NULL;
       break;
     case DATA_WIN:
       win_info->detail.data_display_info.data_content = (tui_win_content) NULL;
@@ -681,10 +681,10 @@ tui_del_window (struct tui_win_info *win_info)
          generic_win->handle = (WINDOW *) NULL;
          generic_win->is_visible = FALSE;
        }
-      if (win_info->detail.source_info.filename)
+      if (win_info->detail.source_info.fullname)
         {
-          xfree (win_info->detail.source_info.filename);
-          win_info->detail.source_info.filename = 0;
+          xfree (win_info->detail.source_info.fullname);
+          win_info->detail.source_info.fullname = NULL;
         }
       generic_win = win_info->detail.source_info.execution_info;
       if (generic_win != (struct tui_gen_win_info *) NULL)
@@ -731,10 +731,10 @@ tui_free_window (struct tui_win_info *win_info)
          generic_win->handle = (WINDOW *) NULL;
        }
       tui_free_win_content (generic_win);
-      if (win_info->detail.source_info.filename)
+      if (win_info->detail.source_info.fullname)
         {
-          xfree (win_info->detail.source_info.filename);
-          win_info->detail.source_info.filename = 0;
+          xfree (win_info->detail.source_info.fullname);
+          win_info->detail.source_info.fullname = NULL;
         }
       generic_win = win_info->detail.source_info.execution_info;
       if (generic_win != (struct tui_gen_win_info *) NULL)
index 245b33efe626a2a33f2f91ffce94e8d8312c185e..703eeb8988019d1de0829e306103b87e5fd31a8c 100644 (file)
@@ -270,7 +270,10 @@ struct tui_source_info
   struct tui_gen_win_info *execution_info;
   int horizontal_offset;       /* Used for horizontal scroll.  */
   struct tui_line_or_address start_line_or_addr;
-  char *filename;
+
+  /* It is the resolved form as returned by symtab_to_fullname.  */
+  char *fullname;
+
   /* Architecture associated with code at this location.  */
   struct gdbarch *gdbarch;
 };
index fb60fd463ef9164d37c7998ace618aca4983b6b6..4368c04ff375f3903d757c0c0554d9b6d605e3ba 100644 (file)
@@ -99,9 +99,8 @@ tui_set_source_content (struct symtab *s,
                     xfree (TUI_SRC_WIN->generic.title);
                   TUI_SRC_WIN->generic.title = xstrdup (s->filename);
 
-                  if (src->filename)
-                    xfree (src->filename);
-                  src->filename = xstrdup (s->filename);
+                 xfree (src->fullname);
+                 src->fullname = xstrdup (symtab_to_fullname (s));
 
                  /* Determine the threshold for the length of the
                      line and the offset to start the display.  */
index 6c72a6cebfc237e7f1e9b5a120184e2f999c3603..225b89036de9a2eb8e11cbd69bdea6d91fdaefbf 100644 (file)
@@ -463,7 +463,8 @@ tui_update_breakpoint_info (struct tui_win_info *win,
            {
              if ((win == TUI_SRC_WIN
                   && loc->symtab != NULL
-                  && (filename_cmp (src->filename, loc->symtab->filename) == 0)
+                  && filename_cmp (src->fullname,
+                                   symtab_to_fullname (loc->symtab)) == 0
                   && line->line_or_addr.loa == LOA_LINE
                   && loc->line_number == line->line_or_addr.u.line_no)
                  || (win == TUI_DISASM_WIN