* tracepoint.c (print_one_static_tracepoint_marker): Constify.
authorTom Tromey <tromey@redhat.com>
Thu, 18 Oct 2012 20:14:45 +0000 (20:14 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 18 Oct 2012 20:14:45 +0000 (20:14 +0000)
* symtab.c (iterate_over_some_symtabs): Constify.
* source.h (symtab_to_fullname): Return 'const char *'.
* source.c (symtab_to_fullname): Return 'const char *'.
* python/py-symtab.c (stpy_fullname): Constify.
* cli/cli-cmds.c (edit_command): Constify.
* breakpoint.c (print_breakpoint_location)
(update_static_tracepoint): Constify.

gdb/ChangeLog
gdb/breakpoint.c
gdb/cli/cli-cmds.c
gdb/python/py-symtab.c
gdb/source.c
gdb/source.h
gdb/symtab.c
gdb/tracepoint.c

index 124523d6d11add84ebb4584ad7fe551c2911e829..b344cbacca8a5d948680e77309b4bb701d4cba62 100644 (file)
@@ -1,3 +1,14 @@
+2012-10-18  Tom Tromey  <tromey@redhat.com>
+
+       * tracepoint.c (print_one_static_tracepoint_marker): Constify.
+       * symtab.c (iterate_over_some_symtabs): Constify.
+       * source.h (symtab_to_fullname): Return 'const char *'.
+       * source.c (symtab_to_fullname): Return 'const char *'.
+       * python/py-symtab.c (stpy_fullname): Constify.
+       * cli/cli-cmds.c (edit_command): Constify.
+       * breakpoint.c (print_breakpoint_location)
+       (update_static_tracepoint): Constify.
+
 2012-10-18  Tom Tromey  <tromey@redhat.com>
 
        * breakpoint.c (compare_breakpoints): Fix comparison.
index 4a5c8c1cd6857238ea00ee6d850b8bd564836f52..76e3e89bb97145e61bf043cc319fabeb01674847 100644 (file)
@@ -5689,7 +5689,7 @@ print_breakpoint_location (struct breakpoint *b,
       if (ui_out_is_mi_like_p (uiout))
        {
          struct symtab_and_line sal = find_pc_line (loc->address, 0);
-         char *fullname = symtab_to_fullname (sal.symtab);
+         const char *fullname = symtab_to_fullname (sal.symtab);
          
          if (fullname)
            ui_out_field_string (uiout, "fullname", fullname);
@@ -13822,7 +13822,7 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal)
 
          if (ui_out_is_mi_like_p (uiout))
            {
-             char *fullname = symtab_to_fullname (sal2.symtab);
+             const char *fullname = symtab_to_fullname (sal2.symtab);
 
              if (fullname)
                ui_out_field_string (uiout, "fullname", fullname);
index dcf53694f409db9db989fd752a34e2f8c6a20754..b65262e4189cab7a9e8e9aa119da4b03f36c1b06 100644 (file)
@@ -762,7 +762,8 @@ edit_command (char *arg, int from_tty)
   struct symbol *sym;
   char *arg1;
   char *editor;
-  char *p, *fn;
+  char *p;
+  const char *fn;
 
   /* Pull in the current default source line if necessary.  */
   if (arg == 0)
index 21a172cadd8e63453c854950f918e599d76b9149..c023ad51c5f2a5fcc8ce11de545a9d480a303e87 100644 (file)
@@ -126,7 +126,7 @@ stpy_get_objfile (PyObject *self, void *closure)
 static PyObject *
 stpy_fullname (PyObject *self, PyObject *args)
 {
-  char *fullname;
+  const char *fullname;
   struct symtab *symtab = NULL;
 
   STPY_REQUIRE_VALID (self, symtab);
index 31e104fe4016cbddc504be43aae0e5d0913530ba..bd11c63192e6e07305ee111a5beedbdf61cc5d49 100644 (file)
@@ -1081,7 +1081,7 @@ open_source_file (struct symtab *s)
    If this function fails to find the file that this symtab represents,
    NULL will be returned and s->fullname will be set to NULL.  */
 
-char *
+const char *
 symtab_to_fullname (struct symtab *s)
 {
   int r;
index bf9a688903081f504da61c7fb4bca8b420d59d9e..a8918a9d19a72cbb2935e4ef8c2903cb15736631 100644 (file)
@@ -48,7 +48,7 @@ extern int find_and_open_source (const char *filename,
    negative number for error.  */
 extern int open_source_file (struct symtab *s);
 
-extern char* symtab_to_fullname (struct symtab *s);
+extern const char *symtab_to_fullname (struct symtab *s);
 
 /* Create and initialize the table S->line_charpos that records the
    positions of the lines in the source file, which is assumed to be
index cbfe4d07af2a714520d329cd13922315d811b667..7e1622226a214d30db8a993dee337b88d358b6d0 100644 (file)
@@ -242,7 +242,7 @@ iterate_over_some_symtabs (const char *name,
 
     if (real_path != NULL)
       {
-        char *fullname = symtab_to_fullname (s);
+        const char *fullname = symtab_to_fullname (s);
 
         if (fullname != NULL)
           {
index cce8d002363263b7472538c81c7ad2b36033f696..6e55d57033de30695fb3c089eb2e779324ca44dd 100644 (file)
@@ -4838,7 +4838,7 @@ print_one_static_tracepoint_marker (int count,
 
       if (ui_out_is_mi_like_p (uiout))
        {
-         char *fullname = symtab_to_fullname (sal.symtab);
+         const char *fullname = symtab_to_fullname (sal.symtab);
 
          if (fullname)
            ui_out_field_string (uiout, "fullname", fullname);
This page took 0.065469 seconds and 4 git commands to generate.