lijiang1489 at 163 dot com
2018-10-22 06:33:50 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23808
Bug ID: 23808
Summary: “permanent“ not suitable for some cases
Product: gdb
Version: 7.12
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: lijiang1489 at 163 dot com
Target Milestone: ---
As i checked the codes and prompts, attribute "permanent" of breakpoint is
trying to solving cases that when setting a bkpt met one wrote a 'bkpt' in its
code.
It may be not useful in some cases.
cases:
1. If i debug a vmlinux via hardware debug chain and set a address breakpoint
where an a.out will go through, when i set this bkpt, the a.out has not been
loaded on the vmlinux. At this time, the contents at address of bkpt is random,
it may be equal to a bkpt insn of the corresponding arch.
2. When i debug a program via hardware chain, like arm, mips, gdb allows users
set a breakpoint before one download the program. Obviously, the memory before
downloading is also random. it may be equal to a bkpt insn of the corresponding
arch。
Here, if the breakpoint is recognized as "permanent" and the program meets it,
how to do it here ? The default operation is set PC to the next-PC, then a insn
will be missed. Program will not run normally.
As i think, if one wrote a bkpt in his code, the operation after the bkpt met
should be user-defined all by himself. The default operation in GDB will make
some arch not work well.
Bug ID: 23808
Summary: “permanent“ not suitable for some cases
Product: gdb
Version: 7.12
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: lijiang1489 at 163 dot com
Target Milestone: ---
As i checked the codes and prompts, attribute "permanent" of breakpoint is
trying to solving cases that when setting a bkpt met one wrote a 'bkpt' in its
code.
It may be not useful in some cases.
cases:
1. If i debug a vmlinux via hardware debug chain and set a address breakpoint
where an a.out will go through, when i set this bkpt, the a.out has not been
loaded on the vmlinux. At this time, the contents at address of bkpt is random,
it may be equal to a bkpt insn of the corresponding arch.
2. When i debug a program via hardware chain, like arm, mips, gdb allows users
set a breakpoint before one download the program. Obviously, the memory before
downloading is also random. it may be equal to a bkpt insn of the corresponding
arch。
Here, if the breakpoint is recognized as "permanent" and the program meets it,
how to do it here ? The default operation is set PC to the next-PC, then a insn
will be missed. Program will not run normally.
As i think, if one wrote a bkpt in his code, the operation after the bkpt met
should be user-defined all by himself. The default operation in GDB will make
some arch not work well.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.