From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 93A453851C37 for ; Mon, 26 Jul 2021 12:52:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 93A453851C37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x436.google.com with SMTP id z7so10887593wrn.11 for ; Mon, 26 Jul 2021 05:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=UOaMLd1cYCXfcMQesGN28wQJpNlEmzy8WmwxfiZWKfw=; b=ZnGgmQOlge2ZQweEddd8JWfoaMAKOEB9mjVXi7zKGIUHfFUPwjYefL5XAygSXIf5MD boTsggleIhQ31qzeABMUbQzSiW6vBapcDjB3E4xtA2NKY6pPtxptu11+7GtCta9iSgUn BZlGxxuvKFr8OvcvJLudODU4T6qvP5kkbDT7dUfeIaHi25Cm/AcxtjWSaB1kKmcuzS9Y wYINj8t7AJWbTbpdm66IlHsc4jZZRQvC4wimRnz/AzrS7XRCcok1iTejZWnZFWrX0Z4f vzrAHTaoYn4fCW7iO17+t8RzzslBZzSWZFQqQc+U7im/wUI8sE+NY/iFGG98ibVUdmEq gR4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=UOaMLd1cYCXfcMQesGN28wQJpNlEmzy8WmwxfiZWKfw=; b=B0XoYy0txc0k7BwVC1kBXgCQ+2Mig9ycXQVPDMcrq3T44g6aLLi4XH6KHk500wfHnr fU61jRj7dVHdsXMvehT3QgZcrMHMvyfFbYVgF/kT9SfV90Ucw4K8uF5vG29wvvcwmCqk qx5JsRhpOYDIdUw92V+bz3pEXZHF+qNSh1Yp0//8U+l8IuIhZc8N9E5IAeKO95sxAMbJ wCpeC9HT8zaK8ckfl1xIstlqQ1ewIEsEYSFg1odCxdBz/a5weR2TJ3h06tyIRdjA3UBD Me9K96oEuJOhlc5t+4fbAY2iPVmxzl5NESjLfBsxu/uY3VC/SYxKgOHqbZr34pmlxv4i mcUA== X-Gm-Message-State: AOAM5330j0K1X8owMsKhfy7OahI17xiUxY5NqSA1676xaccZhUm3QP/n X+am0Tl0oNt4vaXEyr9FxD1d8g== X-Google-Smtp-Source: ABdhPJwbjjGra2yI68nSO89q6ZCh3cvwxKDhDG+1+Huy/5jPiFeMZW2n2/lqPSHH7FcAEOfSSc+KUw== X-Received: by 2002:adf:e3c7:: with SMTP id k7mr3520472wrm.327.1627303949691; Mon, 26 Jul 2021 05:52:29 -0700 (PDT) Received: from localhost (host86-161-16-194.range86-161.btcentralplus.com. [86.161.16.194]) by smtp.gmail.com with ESMTPSA id g3sm42471721wru.95.2021.07.26.05.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 05:52:29 -0700 (PDT) Date: Mon, 26 Jul 2021 13:52:28 +0100 From: Andrew Burgess To: SUN Michael Cc: "gdb@sourceware.org" Subject: Re: [gdb v10] My Build Cannot Tell the Symbol Info. to Debug the Core Dump Message-ID: <20210726125228.GA4037238@embecosm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 13:45:07 up 9 days, 23:18, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_STOCKGEN, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: Mon, 26 Jul 2021 12:52:32 -0000 * SUN Michael via Gdb [2021-07-26 10:40:12 +0000]: > Hi team, >=20 >=20 > Now I meet an issue when to debug the core dump file. That=E2=80=99s it: > Using gdb v9 and the older version the related symbol files will be auto = loaded following the command: > $ gdb $EXE $CORE -ex =E2=80=9Cset sysroot $SYMBOL_PATH=E2=80=9D >=20 > GNU gdb (GDB) 9.2 > Copyright (C) 2020 Free Software Foundation, Inc. > =E2=80=A6 =E2=80=A6 > Reading symbols from <$EXE>... > [New LWP 1800] > [New LWP =E2=80=A6 ] > =E2=80=A6 =E2=80=A6 > Reading symbols from XXX > =E2=80=A6 =E2=80=A6 > (gdb) >=20 >=20 > However, on gdb v10 there=E2=80=99s no =E2=80=9CReading symbols from=E2= =80=9D processing:(, > and the console directly goes to =E2=80=9C(gdb)=E2=80=9D without any wait= or prompt. That's weird, I'd expect there to be some kind of message, even where there's no debug symbols. Using GDB 10.1, here's me starting up using a stripped executable: Reading symbols from make-core.x... (No debugging symbols found in make-core.x) [New LWP 659726] Core was generated by `/home/andrew/tmp/make-core.x'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000401141 in ?? () (gdb)=20 The other possibility would be the executable is missing, in this case GDB will still load the core file. But even then you get a warning: make-core.typo.x: No such file or directory. [New LWP 659726] Core was generated by `/home/andrew/tmp/make-core.x'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000401141 in ?? () (gdb)=20 You could try switching on a few debug flags and see if they help at all, maybe something like (note, starting GDB with -n to avoid loading any init files, just in case they are hurting in some weird way): $ gdb -n (gdb) set debug dwarf-read 1 (gdb) set debug symtab-create 1 (gdb) file ${EXE} (gdb) core-file ${COREFILE} this might help understand what's going on. Thanks, Andrew > And then after I typed =E2=80=9Cbt=E2=80=9D, there=E2=80=99 no symbol inf= ormation =E2=80=95 it seems the symbols have not been loaded at all: > #0 0x0000000c0d8b50 in ?? () > #1 0x0000000ddbd808 in ?? () >=20 >=20 > I CROSS-compiled v9 and v10 using the same configuration as below: > configure --host=3Dx86_64-pc-linux-gnu --target=3Daarch64-linux-android -= -with-python=3D/usr/bin/python --with-expat --with-lzma >=20 > , and my v10=E2=80=99s =E2=80=9Cshow configuration=E2=80=9D: > configure --host=3Dx86_64-pc-linux-gnu --target=3Daarch64-linux-android > --with-auto-load-dir=3D$debugdir:$datadir/auto-load > --with-auto-load-safe-path=3D$debugdir:$datadir/auto-load > --with-expat > --with-gdb-datadir=3D/XXX/gdb/gdb-10/share/gdb (relocatable) > --with-jit-reader-dir=3D/XXX/gdb/gdb-10/lib/gdb (relocatable) > --without-libunwind-ia64 > --with-lzma > --without-babeltrace > --without-intel-pt > --without-mpfr > --without-xxhash > --with-python=3D/usr > --with-python-libdir=3D/usr/lib > --without-debuginfod > --without-guile > --disable-source-highlight > --with-separate-debug-dir=3D/XXX/gdb/gdb-10/lib/debug (reloc= atable) >=20 >=20 > Appreciate for your attention and help in advance:) > THX!! >=20 >=20 >=20 > Best regards, >=20 >=20 > Michael SUN >=20