From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22770 invoked by alias); 27 Jul 2011 15:30:33 -0000 Received: (qmail 22761 invoked by uid 22791); 27 Jul 2011 15:30:31 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Wed, 27 Jul 2011 15:30:09 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6RFU96d017821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 27 Jul 2011 11:30:09 -0400 Received: from host1.jankratochvil.net (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6RFU60n001123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 27 Jul 2011 11:30:08 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p6RFU5oN010251 for ; Wed, 27 Jul 2011 17:30:05 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p6RFU4Wp010249 for gdb-patches@sourceware.org; Wed, 27 Jul 2011 17:30:04 +0200 Date: Wed, 27 Jul 2011 16:15:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch 1/2] Reshuffle code for patch 2/2 Message-ID: <20110727153004.GA9736@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-07/txt/msg00763.txt.bz2 Hi, this change has no functionality effect. The messages texts are now more generalized, no longer specific for CFI. Thanks, Jan gdb/ 2011-07-27 Jan Kratochvil * dwarf2-frame.c (no_get_frame_base, no_get_frame_cfa, no_get_frame_pc) (no_get_tls_address, no_dwarf_call, no_base_type): Move to the other file. (dwarf2_frame_ctx_funcs): Reference the renamed functions. * dwarf2expr.c (ctx_no_get_frame_base, ctx_no_get_frame_cfa) (ctx_no_get_frame_pc, ctx_no_get_tls_address, ctx_no_dwarf_call) (ctx_no_get_base_type): Move the functions here. * dwarf2expr.h (ctx_no_get_frame_base, ctx_no_get_frame_cfa) (ctx_no_get_frame_pc, ctx_no_get_tls_address, ctx_no_dwarf_call) (ctx_no_get_base_type): New declarations. --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -312,55 +312,6 @@ read_mem (void *baton, gdb_byte *buf, CORE_ADDR addr, size_t len) read_memory (addr, buf, len); } -static void -no_get_frame_base (void *baton, const gdb_byte **start, size_t *length) -{ - internal_error (__FILE__, __LINE__, - _("Support for DW_OP_fbreg is unimplemented")); -} - -/* Helper function for execute_stack_op. */ - -static CORE_ADDR -no_get_frame_cfa (void *baton) -{ - internal_error (__FILE__, __LINE__, - _("Support for DW_OP_call_frame_cfa is unimplemented")); -} - -/* Helper function for execute_stack_op. */ - -static CORE_ADDR -no_get_frame_pc (void *baton) -{ - internal_error (__FILE__, __LINE__, _("\ -Support for DW_OP_GNU_implicit_pointer is unimplemented")); -} - -static CORE_ADDR -no_get_tls_address (void *baton, CORE_ADDR offset) -{ - internal_error (__FILE__, __LINE__, _("\ -Support for DW_OP_GNU_push_tls_address is unimplemented")); -} - -/* Helper function for execute_stack_op. */ - -static void -no_dwarf_call (struct dwarf_expr_context *ctx, size_t die_offset) -{ - internal_error (__FILE__, __LINE__, - _("Support for DW_OP_call* is invalid in CFI")); -} - -/* Helper function for execute_stack_op. */ - -static struct type * -no_base_type (struct dwarf_expr_context *ctx, size_t die) -{ - error (_("Support for typed DWARF is not supported in CFI")); -} - /* Execute the required actions for both the DW_CFA_restore and DW_CFA_restore_extended instructions. */ static void @@ -397,12 +348,12 @@ static const struct dwarf_expr_context_funcs dwarf2_frame_ctx_funcs = { read_reg, read_mem, - no_get_frame_base, - no_get_frame_cfa, - no_get_frame_pc, - no_get_tls_address, - no_dwarf_call, - no_base_type + ctx_no_get_frame_base, + ctx_no_get_frame_cfa, + ctx_no_get_frame_pc, + ctx_no_get_tls_address, + ctx_no_dwarf_call, + ctx_no_get_base_type }; static CORE_ADDR --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -1280,6 +1280,54 @@ abort_expression: gdb_assert (ctx->recursion_depth >= 0); } +/* Stub dwarf_expr_context_funcs.get_frame_base implementation. */ + +void +ctx_no_get_frame_base (void *baton, const gdb_byte **start, size_t *length) +{ + error (_("%s is invalid in this context"), "DW_OP_fbreg"); +} + +/* Stub dwarf_expr_context_funcs.get_frame_cfa implementation. */ + +CORE_ADDR +ctx_no_get_frame_cfa (void *baton) +{ + error (_("%s is invalid in this context"), "DW_OP_call_frame_cfa"); +} + +/* Stub dwarf_expr_context_funcs.get_frame_pc implementation. */ + +CORE_ADDR +ctx_no_get_frame_pc (void *baton) +{ + error (_("%s is invalid in this context"), "DW_OP_GNU_implicit_pointer"); +} + +/* Stub dwarf_expr_context_funcs.get_tls_address implementation. */ + +CORE_ADDR +ctx_no_get_tls_address (void *baton, CORE_ADDR offset) +{ + error (_("%s is invalid in this context"), "DW_OP_GNU_push_tls_address"); +} + +/* Stub dwarf_expr_context_funcs.dwarf_call implementation. */ + +void +ctx_no_dwarf_call (struct dwarf_expr_context *ctx, size_t die_offset) +{ + error (_("%s is invalid in this context"), "DW_OP_call*"); +} + +/* Stub dwarf_expr_context_funcs.get_base_type implementation. */ + +struct type * +ctx_no_get_base_type (struct dwarf_expr_context *ctx, size_t die) +{ + error (_("Support for typed DWARF is not supported in this context")); +} + void _initialize_dwarf2expr (void) { --- a/gdb/dwarf2expr.h +++ b/gdb/dwarf2expr.h @@ -253,4 +253,14 @@ const char *dwarf_stack_op_name (unsigned int); void dwarf_expr_require_composition (const gdb_byte *, const gdb_byte *, const char *); +/* Stub dwarf_expr_context_funcs implementations. */ + +void ctx_no_get_frame_base (void *baton, const gdb_byte **start, + size_t *length); +CORE_ADDR ctx_no_get_frame_cfa (void *baton); +CORE_ADDR ctx_no_get_frame_pc (void *baton); +CORE_ADDR ctx_no_get_tls_address (void *baton, CORE_ADDR offset); +void ctx_no_dwarf_call (struct dwarf_expr_context *ctx, size_t die_offset); +struct type *ctx_no_get_base_type (struct dwarf_expr_context *ctx, size_t die); + #endif /* dwarf2expr.h */