From c90a6fb765e9339905803cbfa6cb7adf0431434b Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Fri, 17 Jan 2014 19:39:57 -0200 Subject: [PATCH] Add "volatile" keyword to "struct gdb_exception" declaration While doing something else, I found that those 2 places were incorrectly declaring a "struct gdb_exception" without using the "volatile" keyword. This commit fixes that. 2014-01-17 Sergio Durigan Junior * breakpoint.c (insert_bp_location): Add "volatile" keyword to "struct gdb_exception" declaration. * remote.c (getpkt_or_notif_sane): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/breakpoint.c | 2 +- gdb/remote.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a19de9fa6ed..28e8f6a7d47 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2014-01-17 Sergio Durigan Junior + + * breakpoint.c (insert_bp_location): Add "volatile" keyword to "struct + gdb_exception" declaration. + * remote.c (getpkt_or_notif_sane): Likewise. + 2014-01-17 Doug Evans * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append): New diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 642ffdf8cc6..c8e7e8842e2 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2396,7 +2396,7 @@ insert_bp_location (struct bp_location *bl, { enum errors bp_err = GDB_NO_ERROR; const char *bp_err_message = NULL; - struct gdb_exception e; + volatile struct gdb_exception e; if (!should_be_inserted (bl) || (bl->inserted && !bl->needs_update)) return 0; diff --git a/gdb/remote.c b/gdb/remote.c index e8469e3983f..d8869295af3 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7873,7 +7873,7 @@ getpkt_or_notif_sane (char **buf, long *sizeof_buf, int forever, static void remote_kill (struct target_ops *ops) { - struct gdb_exception ex; + volatile struct gdb_exception ex; /* Catch errors so the user can quit from gdb even when we aren't on speaking terms with the remote system. */