From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3DA3F138C9D for ; Sat, 25 Apr 2015 23:31:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C12AFE0838; Sat, 25 Apr 2015 23:31:29 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AA39FE07D9 for ; Sat, 25 Apr 2015 23:31:27 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ym9Xh-0006mE-4n for gentoo-user@lists.gentoo.org; Sun, 26 Apr 2015 01:31:25 +0200 Received: from 216.240.144.13 ([216.240.144.13]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Apr 2015 01:31:25 +0200 Received: from w41ter by 216.240.144.13 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Apr 2015 01:31:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: walt Subject: [gentoo-user] [~amd64] Confusing behavior from gdb Date: Sat, 25 Apr 2015 16:31:20 -0700 Message-ID: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 216.240.144.13 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 X-Archives-Salt: 4eb44360-642d-439a-9904-4178f95a1be9 X-Archives-Hash: 031903cfdfa35b76ae99f81760960dec I'm ready to swear on a stack of Knuth volumes that gdb has lost its mind. But, I'm willing to consider the remote possibility that I don't know how to use gdb ;) (Because I really don't.) This is my annotated copy/paste from a single gdb session: #gdb /bin/mount GNU gdb (Gentoo 7.9 vanilla) 7.9 (gdb) start Temporary breakpoint 1 at 0x403000: file /var/tmp/portage/sys-apps/util-linux-2.26.1-r1/work/util-linux-2.26.1/sys-utils/mount.c, line 789. Starting program: /bin/mount Temporary breakpoint 1, main (argc=1, argv=0x7ffc3508e108) at /var/tmp/portage/sys-apps/util-linux-2.26.1-r1/work/util-linux-2.26.1/sys-utils/mount.c:789 789 { (gdb) list mount.c:1020 1015 !mnt_context_get_target(cxt) && 1016 !argc && 1017 !all) { 1018 if (oper || mnt_context_get_options(cxt)) 1019 usage(stderr); 1020 print_all(cxt, types, show_labels); 1021 goto done; 1022 } 1023 1024 /* Non-root users are allowed to use -t to print_all(), (gdb) break print_all Breakpoint 2 at 0x4037fd: file /var/tmp/portage/sys-apps/util-linux-2.26.1-r1/work/util-linux-2.26.1/sys-utils/mount.c, line 130. (gdb) list mount.c:123 118 else 119 fputc(*p, stdout); 120 } 121 } 122 123 static void print_all(struct libmnt_context *cxt, char *pattern, int show_label) 124 { 125 struct libmnt_table *tb; 126 struct libmnt_iter *itr = NULL; 127 struct libmnt_fs *fs; (gdb) This seems to me to be very buggy behavior, but I'd like to get opinions from people who really know gdb, which I don't. And thanks for reading this far :)