From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by sourceware.org (Postfix) with ESMTPS id BD600385DC23 for ; Thu, 8 Jul 2021 01:06:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BD600385DC23 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kichwacoders.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=kichwacoders.com Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id F04C8143A9D for ; Wed, 7 Jul 2021 21:06:38 -0400 (EDT) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:cc:content-type; s=sasl; bh=bdIMFMBHiw4UvlcjcNBusPn8MATXLHrU H9GCk6rDuJE=; b=qKqoFeiENvF6nlpW5osdCCNL+ZNi90s9BhW+UJCP0cDtgK11 Y5itftrDq7UQXKO4Y3Vd9du05721qisRZToKhd4U6TVP5u1OR004QLjydc9TMkil utjtQnxyfI8boBEEkNUmX1joWKXiDOr19Jjuh+IYIputIP6XadT9qfHr2Yg= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id E8887143A9C for ; Wed, 7 Jul 2021 21:06:38 -0400 (EDT) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kichwacoders.com; h=mime-version:references:in-reply-to:from:date:message-id:subject:to:cc:content-type; s=mesmtp; bh=bdIMFMBHiw4UvlcjcNBusPn8MATXLHrUH9GCk6rDuJE=; b=WOsteptj6lZfSlhniQH3YnVJacZ/7nI/As8+4e3TLwSjyjMRRW2H81guTwZKdkfpRgAzK1frpnq9cs8QJIjrOQJjuuJ5PsQ1pCZAayujW2OYYbZfJ8UaLOQUAijR8QFsY+4UuWnLSu0OxBThaIoBVy31jGuj27YHD3m51+WVTKs= Received: from mail-wm1-f54.google.com (unknown [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 906EB143A9B for ; Wed, 7 Jul 2021 21:06:35 -0400 (EDT) (envelope-from jonah@kichwacoders.com) Received: by mail-wm1-f54.google.com with SMTP id j34so2966494wms.5 for ; Wed, 07 Jul 2021 18:06:35 -0700 (PDT) X-Gm-Message-State: AOAM5337VMmLR4T3tn3ElUCVrEL0Bawn7cl1Is9yCXxfEmOfe6nAgjD/ 7pt6Yc0KEvFYOC6jAqylEolD0PG/jqBCMI/9f+U= X-Google-Smtp-Source: ABdhPJz8tPv80ICzG47jgSLtrCectLMJhKzohzaIg2DvTdTR8d7tWD5f5dPTcZqzJlACkJ82cLQgSRirQjOtoiNr7wY= X-Received: by 2002:a1c:1d82:: with SMTP id d124mr2014661wmd.68.1625706393528; Wed, 07 Jul 2021 18:06:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonah Graham Date: Wed, 7 Jul 2021 21:05:57 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: assertion error in pretty printing To: Simon Marchi Cc: GDB Development X-Pobox-Relay-ID: BDB27966-DF88-11EB-A516-D5C30F5B5667-18936988!pb-smtp20.pobox.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2021 01:06:46 -0000 On Wed, 7 Jul 2021 at 17:13, Simon Marchi wrote: > On 2021-07-07 2:34 p.m., Jonah Graham wrote: > > Hi folks. > > > > I have an internal error in GDB that AFAICT is down to the python pretty > > printers. This is being hit by CDT (reported in > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=574645) > > > > Doing a -var-update I get this internal error: > > > > ~"/scratch/gdb/binutils-gdb/gdb/c-varobj.c:516: internal-error: > std::string > > c_value_of_variable(const varobj*, varobj_display_formats): Assertion > > `!value_lazy (var->value.get ())' failed.\nA problem internal to GDB has > > been detected,\nfurther debugging may prove unreliable.\nQuit this > > debugging session? (y or n) " > > > > Steps to reproduce: > > > > Get source from > > > https://bugzillaattachments.eclipsecontent.org/bugs/attachment.cgi?id=286726 > > curl > > > https://bugzillaattachments.eclipsecontent.org/bugs/attachment.cgi?id=286726 > >> bug574645.cpp > > g++ -std=c++2a -O0 -g3 bug574645.cpp -o bug574645 > > gdb --interpreter=mi2 > > > > then use these commands: > > 6-enable-pretty-printing > > 8-gdb-set print object on > > 19-file-exec-and-symbols --thread-group i1 bug574645 > > 26-break-insert -f bug574645.cpp:31 > > 27-break-insert -t -f main > > 29-exec-run --thread-group i1 > > 41-var-create --thread 1 --frame 0 - * data2 > > 44-var-list-children var1 0 1 > > 48-exec-continue --thread 1 > > 51-var-update 1 var1 > > > > If running with a locally built GDB the python pretty printers need to be > > pointed at (e.g. add --data-directory=/usr/share/gdb to gdb command > line) > > > > Where do I start debugging this? I have reproduced with latest HEAD of > > gdb + the data directory on my Ubuntu 20.04 machine. > > Hi Jonah, > > First, maybe file a bug with that information. > > Then, I'm not sure what to say. You need to understand why this assert > is there, why it is failing in this case, what lead up to this. Classic > debugging / investigative work. > > I can't provide you with pointers in the code without looking at the > problem myself (which I don't really have time to do), other than "check > the backtrace at the point of the crash". Do you need guidance / tips > on how to debug GDB with GDB? > Hi Simon, My ask was way too wooly - I spent a bunch of time learning about data directories and python integrations before I understood what the problem was and asked for help a little too soon. I'll create a ticket and see what else I can figure out so I can come back with a more specific ask (or a fix :-). Thanks for taking the time to reply. Jonah > > Thanks, > > Simon >