my problem is still persisting.
well i am not quite sure that i use gdb the right way.
Code:
%gcc -o test test.c
%./test
location of buffer: 0xbfbffbdb
value of buffer: 'A'
location of temp: 0xbfbffbdc
value of temp: 0xbfbffbdb
value of *temp: 'A'
%gdb test
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...(no debugging symbols found)...
(gdb) disass main
Dump of assembler code for function main:
0x8048494 <main>: push %ebp
0x8048495 <main+1>: mov %esp,%ebp
0x8048497 <main+3>: sub $0x18,%esp
0x804849a <main+6>: movb $0x41,0xfffffffb(%ebp)
0x804849e <main+10>: lea 0xfffffffb(%ebp),%eax
0x80484a1 <main+13>: mov %eax,0xfffffffc(%ebp)
0x80484a4 <main+16>: add $0xfffffff8,%esp
0x80484a7 <main+19>: lea 0xfffffffb(%ebp),%eax
0x80484aa <main+22>: push %eax
0x80484ab <main+23>: push $0x804854b
0x80484b0 <main+28>: call 0x8048358 <printf>
0x80484b5 <main+33>: add $0x10,%esp
0x80484b8 <main+36>: add $0xfffffff8,%esp
0x80484bb <main+39>: movsbl 0xfffffffb(%ebp),%eax
0x80484bf <main+43>: push %eax
0x80484c0 <main+44>: push $0x8048563
0x80484c5 <main+49>: call 0x8048358 <printf>
0x80484ca <main+54>: add $0x10,%esp
0x80484cd <main+57>: add $0xfffffff8,%esp
0x80484d0 <main+60>: lea 0xfffffffc(%ebp),%eax
0x80484d3 <main+63>: push %eax
0x80484d4 <main+64>: push $0x804857d
0x80484d9 <main+69>: call 0x8048358 <printf>
0x80484de <main+74>: add $0x10,%esp
0x80484e1 <main+77>: add $0xfffffff8,%esp
0x80484e4 <main+80>: mov 0xfffffffc(%ebp),%eax
0x80484e7 <main+83>: push %eax
0x80484e8 <main+84>: push $0x8048595
0x80484ed <main+89>: call 0x8048358 <printf>
0x80484f2 <main+94>: add $0x10,%esp
0x80484f5 <main+97>: add $0xfffffff8,%esp
0x80484f8 <main+100>: mov 0xfffffffc(%ebp),%eax
0x80484fb <main+103>: movsbl (%eax),%edx
0x80484fe <main+106>: push %edx
0x80484ff <main+107>: push $0x80485ad
0x8048504 <main+112>: call 0x8048358 <printf>
0x8048509 <main+117>: add $0x10,%esp
0x804850c <main+120>: xor %eax,%eax
0x804850e <main+122>: jmp 0x8048510 <main+124>
0x8048510 <main+124>: leave
0x8048511 <main+125>: ret
0x8048512 <main+126>: mov %esi,%esi
End of assembler dump.
am i looking in the right place?