This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/5] constify to_set_trace_notes


This constifies to_set_trace_notes and fixes up the fallout.

	* remote.c (remote_set_trace_notes): Make arguments const.
	* target.c (update_current_target): Update cast.
	* target.h (to_set_trace_notes): Make arguments const.
---
 gdb/remote.c | 3 ++-
 gdb/target.c | 2 +-
 gdb/target.h | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/remote.c b/gdb/remote.c
index e1c63ad..4bc86be 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -11125,7 +11125,8 @@ remote_set_trace_buffer_size (LONGEST val)
 }
 
 static int
-remote_set_trace_notes (char *user, char *notes, char *stop_notes)
+remote_set_trace_notes (const char *user, const char *notes,
+			const char *stop_notes)
 {
   struct remote_state *rs = get_remote_state ();
   char *reply;
diff --git a/gdb/target.c b/gdb/target.c
index 1c0134f..8653dac 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -946,7 +946,7 @@ update_current_target (void)
 	    (void (*) (LONGEST))
 	    target_ignore);
   de_fault (to_set_trace_notes,
-	    (int (*) (char *, char *, char *))
+	    (int (*) (const char *, const char *, const char *))
 	    return_zero);
   de_fault (to_get_tib_address,
 	    (int (*) (ptid_t, CORE_ADDR *))
diff --git a/gdb/target.h b/gdb/target.h
index ed518c4..ff249fa 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -815,7 +815,8 @@ struct target_ops
 
     /* Add/change textual notes about the trace run, returning 1 if
        successful, 0 otherwise.  */
-    int (*to_set_trace_notes) (char *user, char *notes, char* stopnotes);
+    int (*to_set_trace_notes) (const char *user, const char *notes,
+			       const char *stopnotes);
 
     /* Return the processor core that thread PTID was last seen on.
        This information is updated only when:
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]