From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: gdba probs Date: Thu, 5 Dec 2002 20:40:36 +0000 Sender: emacs-devel-admin@gnu.org Message-ID: <15855.47556.171128.631234@nick.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1039121691 19255 80.91.224.249 (5 Dec 2002 20:54:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Dec 2002 20:54:51 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18K31F-00050P-00 for ; Thu, 05 Dec 2002 21:54:49 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18K39X-0006fO-00 for ; Thu, 05 Dec 2002 22:03:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18K2px-0001CJ-00; Thu, 05 Dec 2002 15:43:09 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18K2pL-0000jl-00 for emacs-devel@gnu.org; Thu, 05 Dec 2002 15:42:31 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18K2op-0000dR-00 for emacs-devel@gnu.org; Thu, 05 Dec 2002 15:42:30 -0500 Original-Received: from bts-0181.dialup.zetnet.co.uk ([194.247.48.181] helo=nick.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18K2oo-0000Yd-00; Thu, 05 Dec 2002 15:41:59 -0500 Original-Received: by nick.uklinux.net (Postfix, from userid 501) id A257876037; Thu, 5 Dec 2002 20:40:36 +0000 (GMT) Original-To: miles@gnu.org X-Mailer: VM 6.97 under Emacs 21.3.50.2 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9901 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9901 Miles Bader writes: > Seeing the recent activity on `gdba', I decided to check it out, and got > bunches of errors. The gdb command line I used was this: ... > It initially divided the frame into 6 (!) windows, most of which I > don't want; The totalview debugger starts with 6 windows. But, hey!, lets be open minded about this. How do you know you don't want them before you know what they do ? > is there a way to customize which windows it uses? (setq gdb-many-windows nil) gives you the just the two windows that I think you're looking for. C-h f `gdba' explains a bit more. Regarding the bunches of errors, they occur because you're using commands that stop/step at the instruction level (break *_start, stepi, etc). Handling these commands is on my TODO list. ;-) For the moment if you want explore what this mode does you have to stick to the statement level (break main, step, etc). I append below a nonsense program that I have used to develop gdb-ui.el. Clearly this isn't useful test the lisp code but it might help to show what it can do. > BTW, note all the spurious `Mark set' and `Replaced 0 occurrences' > messages (I never set the mark or did any replacing) -- it looks like > some lisp code is using the `replace-string' function when it shouldn't > (generally lisp code shouldn't use it at all). I'm using replace-regexp which I know I shouldn't. The elisp manual does say this but doesn't offer an alternative. I have noticed in vc.el from emacs-20.7 : ;; (replace-regexp (concat ":" (regexp-quote file) "$") (concat ":" newname)) (while (re-search-forward (concat ":" (regexp-quote file) "$") nil t) (replace-match (concat ":" newname) nil nil)) Is this construction a standard replacement for replace-regexp in lisp programs ? (if so I think it would be a good idea to say so in the manual) Nick ----------------------------------------------------------- temp.c... /* cc -g -o temp temp.c myprint.o */ typedef struct { int r; float s; } substruct; typedef struct { int* r; float* s; } subref; main(int argc, char **argv) { int a[10]={0,1,4,9,16,25,36,49,64,81}; int i,j,n,bigarray[20][20]; int* k; char* b="fred"; int c[4][3][2]; substruct fred; substruct* bert; struct { int p; substruct q1; substruct q2; } t, *u; struct { int* p; subref* q; } w, *x; int l,m; for (i=0;i<20;i++) { for (j=0;j<20;j++) bigarray[i][j] = 20*i + j; } fred.r = 1; fred.s = 5.5; bert = (void*)malloc(8); w.p = (void*)malloc(4); w.q = (void*)malloc(4); bert->r = 7; bert->s = 8.5; *w.p = 8; t.p = 7; t.q1.r = 2; t.q1.s = 2.5; t.q2.r = 3; t.q2.s = 3.5; /* *x->q->r = 1; *x->q->s = 1.5; */ k = (void*)malloc(4*sizeof(int)); printf("Enter number of iterations : "); scanf("%d",&n); printf("Enter number of iterations again : "); scanf("%d",&n); printf("And again : "); scanf("%d",&n); for (i=0;i