Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gdb & var_arg routines dont work well together
@ 1998-03-09  0:01 Uncle George
  1998-03-09  0:21 ` Quant-X Linux Support
  0 siblings, 1 reply; 3+ messages in thread
From: Uncle George @ 1998-03-09  0:01 UTC (permalink / raw)
  To: axp-list@redhat.com; +Cc: redhat-devel-list@redhat.com

I have been unable to reliably to get GDB to work with C routines that
have an ... in the parameter list.

The following simple routine demonstrates my problem.
The demo works, but u cant get GDB to print the value of i for any of
the iterations.

main(char *f, ... )
{
 int i,j,k; long l,m,n; char* a,* b,* c;

 for (i=1; i<20; i++)
  printf("%d:",i);
 printf("\n");
}


AND
can some ont tell me where i can get current info on alpha/gcc
produced/  asm directives

.frame
.prologue
.mask



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb & var_arg routines dont work well together
  1998-03-09  0:01 gdb & var_arg routines dont work well together Uncle George
@ 1998-03-09  0:21 ` Quant-X Linux Support
  1998-03-09 12:50   ` Uncle George
  0 siblings, 1 reply; 3+ messages in thread
From: Quant-X Linux Support @ 1998-03-09  0:21 UTC (permalink / raw)
  To: axp-list

Uncle George wrote:
> I have been unable to reliably to get GDB to work with C routines that
> have an ... in the parameter list. [...]

As a temporary work-around (until this problem is fixed in gdb, or wherever 
it comes from), you could try to print the value of i using:

(gdb) p *(&i-8)

This will print the contents of the memory address 8 bytes below where 
gdb thinks i should be, which, in this situation, is the correct address
for i.

> can some ont tell me where i can get current info on alpha/gcc
> produced/  asm directives

These are compatible with the syntax used by the assembler for Digital
Unix, which means that you'll find what you're looking for in the
Digital Unix manuals. Some of them are available on the WWW. Have a 
look at

http://axposf1.tuwien.ac.at/campus/doc/DU40B/DOCUMENTATION/HTML/BOOKSHELF.HTM

And, more specifically for your question, at:

http://axposf1.tuwien.ac.at/campus/doc/DU40B/DOCUMENTATION/HTML/AA-PS31D-TET1_html/asm6.html#directive_chapter

(I'm pretty ignorant about the copyright for those on-line manuals, I
just found them on the WWW; use at your own risk)

-n
-- 
==================================\--------------------------------------
 Quant-X Service & Consulting GmbH \ Linux/AXP support: nino@quant-x.com
 http://www.quant-x.com             \     Sales etc.: office@quant-x.com 
-------------------------------------\===================================


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb & var_arg routines dont work well together
  1998-03-09  0:21 ` Quant-X Linux Support
@ 1998-03-09 12:50   ` Uncle George
  0 siblings, 0 replies; 3+ messages in thread
From: Uncle George @ 1998-03-09 12:50 UTC (permalink / raw)
  To: axp-list

have u reported this to the gdb folks?i'd like to myself.

i thought it was/is a setup problem in the assembler created by gcc et al. I dont particularily understand the
linkages, or why there are more things saved, considering that the called routine has no idea how many parms are
on the stack!

thanks for the asm/html pointers.

Quant-X Linux Support wrote:

> Uncle George wrote:
> > I have been unable to reliably to get GDB to work with C routines that
> > have an ... in the parameter list. [...]
>
> As a temporary work-around (until this problem is fixed in gdb, or wherever
> it comes from), you could try to print the value of i using:
>
> (gdb) p *(&i-8)
>
> This will print the contents of the memory address 8 bytes below where
> gdb thinks i should be, which, in this situation, is the correct address
> for i.
>
> > can some ont tell me where i can get current info on alpha/gcc
> > produced/  asm directives
>
> These are compatible with the syntax used by the assembler for Digital
> Unix, which means that you'll find what you're looking for in the
> Digital Unix manuals. Some of them are available on the WWW. Have a
> look at
>
> http://axposf1.tuwien.ac.at/campus/doc/DU40B/DOCUMENTATION/HTML/BOOKSHELF.HTM
>
> And, more specifically for your question, at:
>
> http://axposf1.tuwien.ac.at/campus/doc/DU40B/DOCUMENTATION/HTML/AA-PS31D-TET1_html/asm6.html#directive_chapter
>
> (I'm pretty ignorant about the copyright for those on-line manuals, I
> just found them on the WWW; use at your own risk)
>
> -n
> --
> ==================================\--------------------------------------
>  Quant-X Service & Consulting GmbH \ Linux/AXP support: nino@quant-x.com
>  http://www.quant-x.com             \     Sales etc.: office@quant-x.com
> -------------------------------------\===================================
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-03-09 12:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-09  0:01 gdb & var_arg routines dont work well together Uncle George
1998-03-09  0:21 ` Quant-X Linux Support
1998-03-09 12:50   ` Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox