This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/16157] the function get_pc_function_start (CORE_ADDR pc) maybe inaccurate


https://sourceware.org/bugzilla/show_bug.cgi?id=16157

--- Comment #6 from ggs334 <guosheng_gao at realsil dot com.cn> ---
> Then I don't understand how that frame_id_eq returned true 
The frame_id_eq return false(eq == 0) according to the following condition:
-----
else if (l.code_addr_p && r.code_addr_p && l.code_addr != r.code_addr)
    /* An invalid code addr is a wild card.  If .code addresses are
       different, the frames are different.  */
    eq = 0;
-----
and I try to delete this code, The problem disappears.

> What's different between lop3 and lop2? 
No different from lop2 and lop3, only 2 labels.

------------------

the next case: when I single step in line 196, program run until exit:

Breakpoint 1, zerobss () at crt0.S:196
196             sw      v0, 0(s0)
(gdb) l
191             nop
192
193             # Tell other cores it's ready
194             li      v0, 1
195             LA      (s0, flag_ready)
196             sw      v0, 0(s0)
197
198     all_wait_1:
199             LA      (s0, flag_ready)
200             lw      v0, 0(s0)
(gdb) l 196
191             nop
192
193             # Tell other cores it's ready
194             li      v0, 1
195             LA      (s0, flag_ready)
196             sw      v0, 0(s0)
197
198     all_wait_1:
199             LA      (s0, flag_ready)
200             lw      v0, 0(s0)
(gdb) set debug infrun 1
(gdb) s
=pc:===ffffffffbfc0012c====
=func start===ffffffffbfc000d8====
infrun: clear_proceed_status_thread (Thread 1)
infrun: proceed (addr=0xffffffff, signal=144, step=1)
infrun: resume (step=1, signal=0), trap_expected=1, current thread [Thread 1]
at 0xbfc0012c
infrun: wait_for_inferior ()
infrun: target_wait (-1, status) =
infrun:   42000 [Thread 1],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xbfc00130
=pc:===ffffffffbfc00130====
=func start===ffffffffbfc00130====
=pc:===ffffffffbfc0011f====
=func start===ffffffffbfc000d8====
infrun: stepped into subroutine
infrun: inserting step-resume breakpoint at 0xbfc00004
infrun: resume (step=0, signal=0), trap_expected=0, current thread [Thread 1]
at 0xbfc00130
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   42000 [Remote target],
infrun:   status->kind = exited, status = 0
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_EXITED
[Inferior 1 (Remote target) exited normally]

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]