From: Yao Qi <qiyaoltc@gmail.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Fix inferior memory reading in GDBServer for arm/aarch32.
Date: Fri, 09 Dec 2016 12:06:00 -0000 [thread overview]
Message-ID: <20161209120558.GF13661@E107787-LIN> (raw)
In-Reply-To: <wwokshq7wmhb.fsf@ericsson.com>
On 16-12-01 13:09:56, Antoine Tremblay wrote:
>
> After some more thought, it can happen even with current code too that
> single step breakpoints are installed without a step-over.
>
> Consider this situation:
>
> In non-stop:
>
> the user issues:
>
> thread 1
> step&
> thread 2
> step&
> thread 3
> step&
>
> In a similar way as non-stop-fair-events.exp (threads are looping).
>
> GDBServer:
>
> linux_resume is called
> GDBServer has pending events,
> threads are not resumed and single-step breakpoint for thread 1 not installed.
>
> linux_wait_1 is called with a pending event on thread 2 at pc A
> GDBServer handles the event and calls proceed_all_lwps
> This calls proceed_one_lwp and installs single-step breakpoints on all
> the threads that need one.
>
> Now since thread 1 needs to install a single-step breakpoint and is at pc B
> (different than thread 2), a step-over is not initiated and get_next_pc
> is called to figure out the next instruction from pc B.
>
> However it may just be that thread 3 as a single step breakpoint at pc
> B. And thus get_next_pc fails.
>
> This situation is tested with non-stop-fair-events.exp.
>
> Sorry for the confusion, you can consider only the two last replies as
> valid.
This helps understanding the problem, and helps me recalling one patch
in my tree, but I didn't submit it (I can't remember why).
Single-step breakpoints are installed in proceed_one_lwp for each thread.
GDBserver proceeds two threads for resume_step, as requested by GDB,
and the thread proceeded later may see the single-step breakpoints
installed for the thread proceeded just now.
Please add these explanations to the commit log.
--
Yao (é½å°§)
From 716477ebf1c00c04235953c345a295bb3ea91dd9 Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Mon, 29 Feb 2016 12:50:58 +0000
Subject: [PATCH] Call check_mem_read in get_next_pcs_read_memory_unsigned_integer
get_next_pcs_read_memory_unsigned_integer only calls
*the_target->read_memory but doesn't call check_mem_read,
gdb/gdbserver:
2016-03-02 Yao Qi <yao.qi@linaro.org>
* linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
Call read_inferior_memory instead of *the_target->read_memory.
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index ed9b356..a62904a 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -263,7 +263,7 @@ get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
ULONGEST res;
res = 0;
- (*the_target->read_memory) (memaddr, (unsigned char *) &res, len);
+ read_inferior_memory (memaddr, (unsigned char *) &res, len);
return res;
}
next prev parent reply other threads:[~2016-12-09 12:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 12:28 Antoine Tremblay
2016-11-28 12:28 ` [PATCH 2/3] Fix inferior memory reading in GDBServer for ppc Antoine Tremblay
2016-11-28 12:28 ` [PATCH 3/3] Fix inferior memory reading in GDBServer for sparc Antoine Tremblay
2016-12-09 12:51 ` Antoine Tremblay
2016-11-30 20:46 ` [PATCH 1/3] Fix inferior memory reading in GDBServer for arm/aarch32 Luis Machado
2016-12-01 14:44 ` Yao Qi
2016-12-01 15:28 ` Antoine Tremblay
2016-12-01 15:55 ` Antoine Tremblay
2016-12-01 16:18 ` Antoine Tremblay
2016-12-01 18:10 ` Antoine Tremblay
2016-12-09 12:06 ` Yao Qi [this message]
2016-12-09 12:22 ` [PATCH v2] " Antoine Tremblay
2016-12-09 12:23 ` [PATCH 1/3] " Yao Qi
2016-12-09 12:46 ` [PATCH v3] " Antoine Tremblay
2017-01-09 11:55 ` Antoine Tremblay
2017-01-09 17:31 ` Yao Qi
2017-01-09 17:41 ` Antoine Tremblay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161209120558.GF13661@E107787-LIN \
--to=qiyaoltc@gmail.com \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox