This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Why gdb/gdbserver handler breakpoint on gdb client side (ARM)?
- From: <Paul_Koning at Dell dot com>
- To: <fdingiit at gmail dot com>
- Cc: <gdb at sourceware dot org>
- Date: Thu, 25 Jun 2015 13:49:42 +0000
- Subject: Re: Why gdb/gdbserver handler breakpoint on gdb client side (ARM)?
- Authentication-results: sourceware.org; auth=none
- References: <CAGmPkfK3TicvDbv88U5YsxwuCv=rO-ciBMNMp6cteq4UABPohg at mail dot gmail dot com>
> On Jun 24, 2015, at 9:22 PM, Fei Ding <fdingiit@gmail.com> wrote:
>
> Hi.
>
> Recently I am working on debugging a bug of gdb/gdbserver when setting
> breakpoints on ARM devices. I found that, gdb-client nearly do nothing
> about it when we use gdb/gdbserver on x86 platform, gdbserver do the
> dirty work in fact, including generate INT 3 instruction, read, save,
> and write memory, etc... But for ARM, this work is done on the
> gdb-client side, which is opposed to x86 case. Anyone know why? Or any
> thoughts?
Some targets have a âhardware breakpointâ or âsoftware breakpointâ feature where the hardware or OS implements breakpoint support directly. Others donât. If they donât, then GDB just does the work by saving the original instruction, replacing it by a break, restoring the original when the breakpoint is hit, and so on.
Both work. Why does it matter which approach is used?
paul