From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4058 invoked by alias); 15 Jan 2020 22:42:20 -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 4049 invoked by uid 89); 15 Jan 2020 22:42:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=BAYES_20,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_SOFTFAIL autolearn=no version=3.3.1 spammy=HTo:U*gdb, HX-Spam-Relays-External:2607, H*RU:f8b0, HX-Spam-Relays-External:f8b0 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jan 2020 22:42:18 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1irrMf-0005US-05 for gdb@sourceware.org; Wed, 15 Jan 2020 17:42:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37997) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1irrMe-0004hQ-PW for gdb@gnu.org; Wed, 15 Jan 2020 17:42:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irrMd-0005RJ-8a for gdb@gnu.org; Wed, 15 Jan 2020 17:42:16 -0500 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]:37190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irrMd-0005Lw-2v for gdb@gnu.org; Wed, 15 Jan 2020 17:42:15 -0500 Received: by mail-il1-x136.google.com with SMTP id t8so16372306iln.4 for ; Wed, 15 Jan 2020 14:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=iz12tpCP+kNh4uQ29yxt3sFEtBbq5pnxMPkY91KX8Is=; b=sy++YEkDCllYZhDSbjUgYWuwExGYvpQMwMdyCHORD/INqqH+rd4Ao6DwEGcApZxhKg nQJFFLeyomoFdw6pHFQon4J9EEXzlxp4pr3qA0E39ybjSmULujWtWd4Tgrt5EYbFmOh0 eyZ3GYwW1FTlzOxnzTVl432npgfhIEvDvj++DzvIPKAQDnaFzdP0wO0aBtG82gAagdzV cIM3HTj06rF7h+KWqTgPoov+al4xnORfTWoc7jM5JS1GJHFP7jtzoND0nAow8vcwCk5h t1Pp+YrkarjUBVCNj2uVKIUPrpBqh2B3xSJ5zNnLILwIMnL0FATC8oyOB9rfEU93c5lV r/RA== MIME-Version: 1.0 From: Ruslan Kabatsayev Date: Wed, 15 Jan 2020 22:42:00 -0000 Message-ID: Subject: How to set a breakpoint on imported Win32 function? To: gdb@gnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::136 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00019.txt.bz2 Hello, I have a program without any debug info, which has an import table with some functions imported by name. E.g. kernel32!ExitProcess is imported, and the debugger should know its name and address. But whenever I run GDB (from mingw-w64) with my test exe and try to set breakpoint on ExitProcess, GDB complains that no symbol table is loaded and asks if I want it set on future library load. After I agree and let the debuggee run, the debuggee exits without any trap (although it does exit via this exact function). OTOH, on Linux I can set a breakpoint on e.g. exit, which gets located in /lib/i386-linux-gnu/libc.so.6 for which I don't have any debug symbols, and the breakpoint successfully traps. So, how can I set a breakpoint on an imported function in Windows? Or is the handling of PE import table to fill GDB's symbol table not implemented? Thanks, Ruslan