teaLeef
teaLeef

Reputation: 1989

gdb command to find arguments

Is there a gdb command to find the location of the arguments of a function? I am debugging a function fun1 that takes as input a string that I enter in stdin. However, I can't find the location where this string is stored. Should the first argument always be stored in $ebp+8?

Upvotes: 1

Views: 1868

Answers (1)

Tom Tromey
Tom Tromey

Reputation: 22589

You can see the location of a variable using "info address". This will try to print the location in a user-friendly way. If you know DWARF you can use "maint set dwarf2 always-disassemble 1" to have it dump the DWARF disassembly.

Upvotes: 2

Related Questions