From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2633 invoked by alias); 30 Jul 2014 07:48:18 -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 2262 invoked by uid 89); 30 Jul 2014 07:48:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Jul 2014 07:48:13 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1XCOcL-000189-Pa from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 30 Jul 2014 00:48:09 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 30 Jul 2014 00:48:09 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Wed, 30 Jul 2014 00:48:08 -0700 Message-ID: <53D8A264.1050103@codesourcery.com> Date: Wed, 30 Jul 2014 08:21:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Subject: Revisit gdb/12528 for bare metal targets Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00776.txt.bz2 I see the following fail on arm-none-eabi target, (gdb) b 24^M Breakpoint 1 at 0x4: file ../../../../git/gdb/testsuite/gdb.base/break-on-linker-gcd-function.cc, line 24.^M (gdb) FAIL: gdb.base/break-on-linker-gcd-function.exp: b 24 This test case is for PR gdb/12528, but I don't think this PR is fixed for bare metal targets. Paul asked for the advice for this PR about how to determine whether an address zero in debug info means the corresponding code has been GC'ed. Then, flag has_section_at_zero was chosen and the code is like: case DW_LNE_set_address: address = read_address (abfd, line_ptr, cu, &bytes_read); if (address == 0 && !dwarf2_per_objfile->has_section_at_zero) { /* This line table is for a function which has been GCd by the linker. Ignore it. PR gdb/12528 */ On some bare metal targets, .text section is located at 0x0 so has_section_at_zero is true. That is why this test fails. I am looking for something else to check, for example, if ADDRESS is zero and address zero isn't within any SEC_LOAD sections of CU ("break-on-linker-gcd-function.cc"), then the function should be GC'ed by the linker. I am not familiar with the stuff about CU and symbols, so I'd like your advice on it. TIA. -- Yao (齐尧)