From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87230 invoked by alias); 7 Dec 2017 14:21:31 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 87221 invoked by uid 89); 7 Dec 2017 14:21:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:2221, ecs X-HELO: hqemgate14.nvidia.com Received: from hqemgate14.nvidia.com (HELO hqemgate14.nvidia.com) (216.228.121.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Dec 2017 14:21:29 +0000 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Thu, 07 Dec 2017 06:21:12 -0800 Received: from HQMAIL106.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 07 Dec 2017 06:21:28 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 07 Dec 2017 06:21:28 -0800 Received: from UKMAIL102.nvidia.com (10.26.138.15) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 7 Dec 2017 14:21:27 +0000 Received: from localhost.localdomain (10.21.45.12) by UKMAIL102.nvidia.com (10.26.138.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 7 Dec 2017 14:21:24 +0000 To: References: From: Dmitry Antipov Subject: Handling language trampoline Message-ID: <690fc1d3-9ba9-51ef-054d-9478993015a6@nvidia.com> Date: Thu, 07 Dec 2017 14:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: UKMAIL101.nvidia.com (10.26.138.13) To UKMAIL102.nvidia.com (10.26.138.15) X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00005.txt.bz2 When debugging a program which is definitely in C++: (gdb) info source [...skipped...] Contains 66 lines. Source language is c++. Producer is clang version 6.0.0 (trunk 319884). Compiled with DWARF 2 debugging format. Does not include preprocessor macro info. I've noticed that 'step' command causes GDB to perform some ObjC-specific work: #0 lookup_minimal_symbol (name=0x8459a1 "_objc_msgSend", sfile=sfile@entry=0x0, objf=objf@entry=0x0) at ../../gdb/minsyms.c:313 #1 0x00000000005bd0f9 in lookup_bound_minimal_symbol (name=) at ../../gdb/minsyms.c:432 #2 0x00000000005c1666 in find_objc_msgsend () at ../../gdb/objc-lang.c:1282 #3 find_objc_msgcall (pc=pc@entry=139646390853344, new_pc=0x7ffe10329598) at ../../gdb/objc-lang.c:1340 #4 0x00000000005c1820 in objc_skip_trampoline (frame=0x16a0eb0, stop_pc=139646390853344) at ../../gdb/objc-lang.c:313 #5 0x000000000059f1dc in skip_language_trampoline (frame=frame@entry=0x16a0eb0, pc=139646390853344) at ../../gdb/language.c:605 #6 0x0000000000597129 in process_event_stop_test (ecs=ecs@entry=0x7ffe10329d10) at ../../gdb/infrun.c:6706 #7 0x0000000000598a10 in handle_signal_stop (ecs=ecs@entry=0x7ffe10329d10) at ../../gdb/infrun.c:6163 #8 0x000000000059a178 in handle_inferior_event_1 (ecs=0x7ffe10329d10) at ../../gdb/infrun.c:5352 #9 handle_inferior_event (ecs=ecs@entry=0x7ffe10329d10) at ../../gdb/infrun.c:5387 #10 0x000000000059af78 in fetch_inferior_event (client_data=) at ../../gdb/infrun.c:3903 #11 0x000000000055c89d in gdb_wait_for_event (block=block@entry=0) at ../../gdb/event-loop.c:859 #12 0x000000000055ca6f in gdb_do_one_event () at ../../gdb/event-loop.c:322 #13 0x000000000055cb5e in gdb_do_one_event () at ../../gdb/event-loop.c:304 #14 start_event_loop () at ../../gdb/event-loop.c:371 #15 0x00000000005af348 in captured_command_loop () at ../../gdb/main.c:329 #16 0x00000000005b019d in captured_main (data=0x7ffe10329e30) at ../../gdb/main.c:1155 #17 gdb_main (args=args@entry=0x7ffe10329f60) at ../../gdb/main.c:1171 #18 0x0000000000408e15 in main (argc=, argv=) at ../../gdb/gdb.c:32 Why it is so if source language was recognized as C++? Dmitry