From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33299 invoked by alias); 20 Feb 2018 15:15:34 -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 18537 invoked by uid 89); 20 Feb 2018 15:15:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=roirand X-HELO: mail-qk0-f180.google.com Received: from mail-qk0-f180.google.com (HELO mail-qk0-f180.google.com) (209.85.220.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Feb 2018 15:15:22 +0000 Received: by mail-qk0-f180.google.com with SMTP id l206so3398628qke.1 for ; Tue, 20 Feb 2018 07:15:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ungBlWaOAp1UnHM76yzNnex1awJLH6fhPizS+bqtU6A=; b=ua8LmMi15yQG7RLk4N1UjHu0IdACotSWrN65uTV/FXsva7P5eE205mxBQ+yhmE5Iv1 xR8fiY5yHhqcOPcYEQEJXXkJ7qupop5NLNS19HcpBXEcVejmO18qR6pwO9Zs8D/2E5cq 0O2h3lRWjUd88yHmWq0kMUQj4o43s92k32AUem6aI2qXwOX8xbupds++0B659ydIsNqK ArdioFN8CIzCA4F+2qPfR9Si9bo3S/HIXL7KyQcSlt60ngvJgYztEqnfnQ/Zwtcmn7Mb EOnyiufj6lV+GpZfKu3qCmvlwhwyFRMYvxyFbPjbQHYyU7xfkT6VOkt+sUzxyA98aj3o y+jQ== X-Gm-Message-State: APf1xPBCkR6h87jXyDBRmfo+0DzkmQ5okxQsUgru1XT5hBR66zoE0h6F xKLYtadYEneGCz9Io58VPAZKSSACrxarOkOJXSYx5Q== X-Google-Smtp-Source: AH8x224Tb+jEkyGdByCoqsailSNMAnIrQ09s4qIIOnKg0DGRee/O3M3UPmgjbFZYSL86OlFt/P88n06ctAjB8lZYTh4= X-Received: by 10.55.56.84 with SMTP id f81mr17960780qka.25.1519139711300; Tue, 20 Feb 2018 07:15:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.168.200 with HTTP; Tue, 20 Feb 2018 07:15:10 -0800 (PST) In-Reply-To: <1519044767-8741-1-git-send-email-roirand@adacore.com> References: <1519044767-8741-1-git-send-email-roirand@adacore.com> From: Yao Qi Date: Tue, 20 Feb 2018 15:15:00 -0000 Message-ID: Subject: Re: [RFA] Fix frame argument printing when using auto language mode To: Xavier Roirand Cc: GDB Patches , Joel Brobecker Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00263.txt.bz2 On Mon, Feb 19, 2018 at 12:52 PM, Xavier Roirand wrot= e: > > The problem is that GDB prints the S parameter in the pck.call_me Ada > function using the current language, so the C one, because the program > is stopped in a C function, whereas it should use the pck.call_me frame > one. This behavior is ok when user manually changes the language but it's > not the right one when language is auto. Agreed, GDB should use per-frame language instead of global current language. However, instead of switching global variable current_language, why don't we pass the per-frame language down to la_val_print? In ada-valprint.c:ada_val_print, ada_val_print_1 (type, embedded_offset, address, stream, recurse, val, options, current_language); ^^^^^^^^^^^^^^^^^ why don't pass language for ada here? --=20 Yao (=E9=BD=90=E5=B0=A7)