From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128723 invoked by alias); 17 Feb 2017 13:25:59 -0000 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 Received: (qmail 128684 invoked by uid 89); 17 Feb 2017 13:25:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=disasmc, UD:disasm.c, disasm.c, Hx-languages-length:1604 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Feb 2017 13:25:56 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE5397E9E1; Fri, 17 Feb 2017 13:25:56 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03661ACBBC; Fri, 17 Feb 2017 13:25:54 +0000 (UTC) Subject: Re: [PATCH 5/5] arc: Add prologue analysis To: Anton Kolesov , gdb-patches@sourceware.org References: <20170214100130.29194-1-Anton.Kolesov@synopsys.com> <20170214100130.29194-5-Anton.Kolesov@synopsys.com> Cc: Francois Bedard From: Pedro Alves Message-ID: <6c70823b-879d-a581-5417-82db9c0ad408@redhat.com> Date: Fri, 17 Feb 2017 13:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170214100130.29194-5-Anton.Kolesov@synopsys.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00480.txt.bz2 On 02/14/2017 10:01 AM, Anton Kolesov wrote: > + > +/* Copy of fprintf_disasm from disasm.c. */ > + > +static int ATTRIBUTE_PRINTF (2, 3) > +arc_fprintf_disasm (void *stream, const char *format, ...) > +{ > + va_list args; > + > + va_start (args, format); > + vfprintf_filtered ((struct ui_file *) stream, format, args); > + va_end (args); > + /* Something non -ve. */ This is always the null stream AFAICS, so why waste time with calling vfprintf_filtered? See disasm.c:gdb_buffered_insn_length_fprintf, for example. > + return 0; > +} > + > +/* Return properly initialized disassemble_info. */ > + > +struct disassemble_info > +arc_disassemble_info (struct gdbarch *gdbarch) Also, something's odd with the patch split, since this function was used by an earlier patch. > +# Test more levels of backtrace. > +gdb_breakpoint nested_prologue_inner temporary > +gdb_continue_to_breakpoint nested_prologue_inner > +gdb_test "backtrace 10" \ > + "#0\[ \t\]*$hex in nested_prologue_inner .*\r\n#1\[ \t\]*$hex in nested_prologue_outer .*\r\n#2\[ \t\]*$hex in main.*" \ > + "backtrace in nested_prologue_inner" > + set regs [saved_regs_to_str {r13 r18}] > + gdb_test "info frame" ".*Saved registers:$regs" \ > + "saved registers in nested_prologue_inner" > + set regs [saved_regs_to_str {r14 r15 blink}] > + gdb_test "info frame 1" ".*Saved registers:$regs" \ > + "saved registers in nested_prologue_outer" > + Something's odd with indentation here. This is missing a NEWS entry for the command. But otherwise, this looks very good to me. Thanks, Pedro Alves