From: Nick Roberts <nick@nick.uklinux.net>
Cc: emacs-devel@gnu.org
Subject: gdba probs
Date: Thu, 5 Dec 2002 20:40:36 +0000 [thread overview]
Message-ID: <15855.47556.171128.631234@nick.uklinux.net> (raw)
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<n;i++) {
m = 4;
a[i] = 2*i;
myprint(i,a[i]);
}
}
myprint.c...
myprint(int i,int j) {
printf("a[%d] = %d\n",i,j);
}
next reply other threads:[~2002-12-05 20:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-05 20:40 Nick Roberts [this message]
2002-12-05 21:49 ` gdba probs Stefan Monnier
2002-12-07 2:38 ` Nick Roberts
2002-12-07 3:10 ` Miles Bader
2002-12-09 15:46 ` Stefan Monnier
2002-12-10 14:19 ` Stefan Monnier
[not found] ` <15862.30022.647969.267154@nick.uklinux.net>
[not found] ` <200212111411.gBBEBUn03805@rum.cs.yale.edu>
2002-12-11 22:27 ` Nick Roberts
2002-12-11 22:48 ` Stefan Monnier
2002-12-12 0:05 ` Nick Roberts
2002-12-12 13:49 ` Stefan Monnier
2002-12-12 14:13 ` Miles Bader
2002-12-13 22:21 ` Richard Stallman
2002-12-12 1:24 ` Miles Bader
2002-12-12 10:22 ` Kim F. Storm
2002-12-15 0:36 ` Nick Roberts
2002-12-07 21:25 ` Richard Stallman
2002-12-08 1:55 ` Nick Roberts
2002-12-09 20:21 ` Richard Stallman
2002-12-10 21:39 ` Nick Roberts
2002-12-10 23:44 ` Kim F. Storm
2002-12-11 20:40 ` Richard Stallman
2002-12-08 2:27 ` Miles Bader
2002-12-10 14:14 ` Stefan Monnier
2002-12-11 17:45 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2002-12-05 6:19 Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15855.47556.171128.631234@nick.uklinux.net \
--to=nick@nick.uklinux.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.