From patchwork Sun Dec 8 18:29:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36592 Received: (qmail 101345 invoked by alias); 8 Dec 2019 18:30:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 101076 invoked by uid 89); 8 Dec 2019 18:30:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-HELO:sk:gateway, H*RU:sk:gateway, HX-Spam-Relays-External:sk:gateway X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.187.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Dec 2019 18:30:03 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway36.websitewelcome.com (Postfix) with ESMTP id D44B640230130 for ; Sun, 8 Dec 2019 11:40:21 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e1JhiZYyX4kpje1Jhi9Uuv; Sun, 08 Dec 2019 12:30:01 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5PI5WwEJ/94/V8mHSUpAm1p93D30XuRjDdj+bue27RU=; b=NtMquuCmgtwrwYDISLJEPCqg9h SEM1f0wjRRsaO7rjQ9AzxWhfyv6v9xXEA4A5t1hVG7EHluwRdiJJSTzwd8A5S1xufIuOkcFo1UeI2 HMzj0sQVZSSeMc8y0MxIEyjM9; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:53618 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1ie1Jh-00456j-6n; Sun, 08 Dec 2019 11:30:01 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 04/55] Use common_val_print in infcmd.c Date: Sun, 8 Dec 2019 11:29:07 -0700 Message-Id: <20191208182958.10181-5-tom@tromey.com> In-Reply-To: <20191208182958.10181-1-tom@tromey.com> References: <20191208182958.10181-1-tom@tromey.com> This changes some spots in infcmd.c to use common_val_print (which, despite its name, is a value-based API) rather than val_print. gdb/ChangeLog 2019-12-08 Tom Tromey * infcmd.c (default_print_one_register_info): Use common_val_print. Change-Id: I13efb6db9f1bf4cb90aa3eac1702a633074e192b --- gdb/ChangeLog | 5 +++++ gdb/infcmd.c | 12 +++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 2a253469e74..c8b444bfd65 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2221,9 +2221,7 @@ default_print_one_register_info (struct ui_file *file, get_user_print_options (&opts); opts.deref_ref = 1; - val_print (regtype, - value_embedded_offset (val), 0, - &format_stream, 0, val, &opts, current_language); + common_val_print (val, &format_stream, 0, &opts, current_language); if (print_raw_format) { @@ -2241,9 +2239,7 @@ default_print_one_register_info (struct ui_file *file, /* Print the register in hex. */ get_formatted_print_options (&opts, 'x'); opts.deref_ref = 1; - val_print (regtype, - value_embedded_offset (val), 0, - &format_stream, 0, val, &opts, current_language); + common_val_print (val, &format_stream, 0, &opts, current_language); /* If not a vector register, print it also according to its natural format. */ if (print_raw_format && TYPE_VECTOR (regtype) == 0) @@ -2251,9 +2247,7 @@ default_print_one_register_info (struct ui_file *file, pad_to_column (format_stream, value_column_2); get_user_print_options (&opts); opts.deref_ref = 1; - val_print (regtype, - value_embedded_offset (val), 0, - &format_stream, 0, val, &opts, current_language); + common_val_print (val, &format_stream, 0, &opts, current_language); } }