[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gdba probs
From: |
Nick Roberts |
Subject: |
gdba probs |
Date: |
Thu, 5 Dec 2002 20:40:36 +0000 |
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);
}
- gdba probs, Miles Bader, 2002/12/05
- gdba probs,
Nick Roberts <=
- Re: gdba probs, Stefan Monnier, 2002/12/05
- Re: gdba probs, Nick Roberts, 2002/12/06
- Re: gdba probs, Miles Bader, 2002/12/06
- Re: gdba probs, Stefan Monnier, 2002/12/09
- Re: gdba probs, Stefan Monnier, 2002/12/10
- Re: gdba probs, Nick Roberts, 2002/12/10
- Re: gdba probs, Stefan Monnier, 2002/12/11
- Re: gdba probs, Nick Roberts, 2002/12/11
- Re: gdba probs, Stefan Monnier, 2002/12/11
- Re: gdba probs, Nick Roberts, 2002/12/11