This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Porting help (passing arguments to a function).
- From: Andrew Cagney <cagney at gnu dot org>
- To: Inderpreet Singh Baweja <Inderpreet dot Baweja at noida dot hcltech dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 04 Jan 2005 15:45:12 -0500
- Subject: Re: Porting help (passing arguments to a function).
- References: <33BC33A9E76474479B76AD0DE8A16972015C96@exch-ntd.nec.noida.hcltech.com>
Inderpreet Singh Baweja wrote:
Hi all,
I am porting some arch. To GDB and I have a question.
My arch when passing arguments to a function uses the register
If the argument is less that 4 bytes in length and for rest of the
Purposes it uses the stack to pass the arguments.
I have already done the unwind part.
But when displaying the frame arguments it always tries
To get then from the stack.
How an I tell GDB to get the arguments from the registers first and
Then the stack?
You mean you do something like:
(gdb) list func
func (a, b, c)
(gdb) break func
(gdb) run
... breakpoint func (a = <memory>, b = <memory>, ...) ....
the parameter list and each members location is obtained using debug
information, it sounds like the debug info is wrong. For stabs, check
the .S file, for dwarf 2, check readelf.
Andrew