* [PATCH] Fix search of large memory area in gdbserver
[not found] <20200422171955.600-1-ssbssa.ref@yahoo.de>
@ 2020-04-22 17:19 ` Hannes Domani
2020-04-22 18:47 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Hannes Domani @ 2020-04-22 17:19 UTC (permalink / raw)
To: gdb-patches
If the search area is bigger than SEARCH_CHUNK_SIZE (16000), then you get
an error in gdbserver:
gdb: (gdb) find /w 0x3c43f0,+20000,0x04030201
gdb: Pattern not found.
gdbserver: Unable to access 3997 bytes of target memory at 0x3c8273, halting search.
The return value of any additional gdb_read_memory calls were compared with the
wrong value, this fixes it.
gdbserver/ChangeLog:
2020-04-22 Hannes Domani <ssbssa@yahoo.de>
* server.cc (handle_search_memory_1): Fix gdb_read_memory return value
comparison.
---
gdbserver/server.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 77175ff74c..0672f9bc4d 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -1103,7 +1103,7 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
: chunk_size);
if (gdb_read_memory (read_addr, search_buf + keep_len,
- nr_to_read) != search_buf_size)
+ nr_to_read) != nr_to_read)
{
warning ("Unable to access %ld bytes of target memory "
"at 0x%lx, halting search.",
--
2.26.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix search of large memory area in gdbserver
2020-04-22 17:19 ` [PATCH] Fix search of large memory area in gdbserver Hannes Domani
@ 2020-04-22 18:47 ` Tom Tromey
2020-04-22 19:26 ` Hannes Domani
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2020-04-22 18:47 UTC (permalink / raw)
To: Hannes Domani via Gdb-patches
>>>>> "Hannes" == Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> writes:
Hannes> 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
Hannes> * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
Hannes> comparison.
Thanks, this is ok.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix search of large memory area in gdbserver
2020-04-22 18:47 ` Tom Tromey
@ 2020-04-22 19:26 ` Hannes Domani
0 siblings, 0 replies; 3+ messages in thread
From: Hannes Domani @ 2020-04-22 19:26 UTC (permalink / raw)
To: Gdb-patches
Am Mittwoch, 22. April 2020, 21:13:43 MESZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
> >>>>> "Hannes" == Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Hannes> 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
>
> Hannes> * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
> Hannes> comparison.
>
> Thanks, this is ok.
Pushed, thanks.
Hannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-22 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200422171955.600-1-ssbssa.ref@yahoo.de>
2020-04-22 17:19 ` [PATCH] Fix search of large memory area in gdbserver Hannes Domani
2020-04-22 18:47 ` Tom Tromey
2020-04-22 19:26 ` Hannes Domani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox