From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19097 invoked by alias); 6 Jan 2012 03:36:51 -0000 Received: (qmail 19088 invoked by uid 22791); 6 Jan 2012 03:36:50 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Jan 2012 03:36:32 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q063aTEe014940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Jan 2012 22:36:29 -0500 Received: from psique ([10.3.112.15]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q063aNGw027577; Thu, 5 Jan 2012 22:36:26 -0500 From: Sergio Durigan Junior To: gdb-patches@sourceware.org Cc: Thiago Jung Bauermann Subject: [obv][commit] Add volatile keyword on struct gdb_exception Date: Fri, 06 Jan 2012 03:36:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00211.txt.bz2 Hi, This subject has been discussed a while ago, but I think it was forgotten (at least by myself): http://sourceware.org/ml/gdb-patches/2011-08/msg00091.html Then, while doing something else, I remembered this problem and decided to do a quick fix. I think this patch classifies as "obvious", since it does not add any feature nor code modifications. Checked-in: http://sourceware.org/ml/gdb-cvs/2012-01/msg00068.html Thanks. --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,20 @@ +2012-01-06 Sergio Durigan Junior + Thiago Jung Bauermann + + * ada-lang.c (ada_exception_name_addr): Add `volatile' keyword + before `struct gdb_exception'. + * breakpoint.c (update_global_location_list_nothrow) + (update_breakpoint_locations, enable_breakpoint_disp): Likewise. + * cp-abi.c (value_rtti_type): Likewise. + * cp-support.c (cp_validate_operator): Likewise. + * infrun.c (insert_exception_resume_breakpoint) + (check_exception_resume, keep_going): Likewise. + * mi-interp.c (mi_breakpoint_created) + (mi_breakpoint_modified): Likewise. + * rs6000-aix-tdep.c (rs6000_convert_from_func_ptr_addr): Likewise. + * solib-ia64-hpux.c (ia64_hpux_at_dld_breakpoint_p) + (ia64_hpux_handle_dld_breakpoint_1): Likewise. + 2012-01-05 Doug Evans * dwarf2read.c (statement_prologue): Delete, unused. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index e2f4727..29956d7 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10943,7 +10943,7 @@ static CORE_ADDR ada_exception_name_addr (enum exception_catchpoint_kind ex, struct breakpoint *b) { - struct gdb_exception e; + volatile struct gdb_exception e; CORE_ADDR result = 0; TRY_CATCH (e, RETURN_MASK_ERROR) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index a0beb15..6bcedc4 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10713,7 +10713,7 @@ breakpoint_retire_moribund (void) static void update_global_location_list_nothrow (int inserting) { - struct gdb_exception e; + volatile struct gdb_exception e; TRY_CATCH (e, RETURN_MASK_ERROR) update_global_location_list (inserting); @@ -11753,7 +11753,7 @@ update_breakpoint_locations (struct breakpoint *b, if (b->cond_string != NULL) { char *s; - struct gdb_exception e; + volatile struct gdb_exception e; s = b->cond_string; TRY_CATCH (e, RETURN_MASK_ERROR) @@ -12324,7 +12324,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition) { /* Initialize it just to avoid a GCC false warning. */ enum enable_state orig_enable_state = 0; - struct gdb_exception e; + volatile struct gdb_exception e; TRY_CATCH (e, RETURN_MASK_ALL) { diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c index cdc4a13..e949088 100644 --- a/gdb/cp-abi.c +++ b/gdb/cp-abi.c @@ -111,7 +111,7 @@ value_rtti_type (struct value *v, int *full, int *top, int *using_enc) { struct type *ret = NULL; - struct gdb_exception e; + volatile struct gdb_exception e; if ((current_cp_abi.rtti_type) == NULL) return NULL; diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 8cea2c5..17f8237 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -1470,7 +1470,7 @@ cp_validate_operator (const char *input) const char *p; struct expression *expr; struct value *val; - struct gdb_exception except; + volatile struct gdb_exception except; p = input; diff --git a/gdb/infrun.c b/gdb/infrun.c index 29db420..24d2720 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5494,7 +5494,7 @@ insert_exception_resume_breakpoint (struct thread_info *tp, struct frame_info *frame, struct symbol *sym) { - struct gdb_exception e; + volatile struct gdb_exception e; /* We want to ignore errors here. */ TRY_CATCH (e, RETURN_MASK_ERROR) @@ -5532,7 +5532,7 @@ static void check_exception_resume (struct execution_control_state *ecs, struct frame_info *frame, struct symbol *func) { - struct gdb_exception e; + volatile struct gdb_exception e; TRY_CATCH (e, RETURN_MASK_ERROR) { @@ -5639,7 +5639,7 @@ keep_going (struct execution_control_state *ecs) } else { - struct gdb_exception e; + volatile struct gdb_exception e; /* Stop stepping when inserting breakpoints has failed. */ diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index c9cd24d..cb22ce2 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -491,7 +491,7 @@ mi_breakpoint_created (struct breakpoint *b) { struct mi_interp *mi = top_level_interpreter_data (); struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ()); - struct gdb_exception e; + volatile struct gdb_exception e; if (mi_suppress_breakpoint_notifications) return; @@ -543,7 +543,7 @@ mi_breakpoint_modified (struct breakpoint *b) { struct mi_interp *mi = top_level_interpreter_data (); struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ()); - struct gdb_exception e; + volatile struct gdb_exception e; if (mi_suppress_breakpoint_notifications) return; diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c index 706e2e5..5531326 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -583,7 +583,7 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch, { CORE_ADDR pc = 0; struct obj_section *pc_section; - struct gdb_exception e; + volatile struct gdb_exception e; TRY_CATCH (e, RETURN_MASK_ERROR) { diff --git a/gdb/solib-ia64-hpux.c b/gdb/solib-ia64-hpux.c index 8a45d75..f349c4c 100644 --- a/gdb/solib-ia64-hpux.c +++ b/gdb/solib-ia64-hpux.c @@ -164,7 +164,7 @@ ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid) int ia64_hpux_at_dld_breakpoint_p (ptid_t ptid) { - struct gdb_exception e; + volatile struct gdb_exception e; ptid_t saved_ptid = inferior_ptid; int result = 0; @@ -278,7 +278,7 @@ ia64_hpux_handle_dld_breakpoint_1 (ptid_t ptid) void ia64_hpux_handle_dld_breakpoint (ptid_t ptid) { - struct gdb_exception e; + volatile struct gdb_exception e; ptid_t saved_ptid = inferior_ptid; inferior_ptid = ptid;