42168df570d0f9a26e2c786731c4ca7831f3df82
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gdb / 7.8.2 / 0001-gdbserver-fix-uClibc-whithout-MMU.patch
1 From 59432cbfe267ad89b7cfc73dcd702b8282ef4e9d Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@openwide.fr>
3 Date: Fri, 10 Apr 2015 22:58:07 +0200
4 Subject: [PATCH] gdbserver: fix uClibc whithout MMU.
5
6 Since commit d86d4aafd4fa22fa4cccb83253fb187b03f97f48, the pid
7 must be retrieved from current_inferior.
8
9 The change has not been made in the function linux_read_offsets().
10
11 Fixes:
12 http://autobuild.buildroot.net/results/9e4/9e4df085319e346803c26c65478accb27eb950ae/build-end.log
13
14 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
15 ---
16  gdb/gdbserver/linux-low.c | 2 +-
17  1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
20 index 1a40897..71d078a 100644
21 --- a/gdb/gdbserver/linux-low.c
22 +++ b/gdb/gdbserver/linux-low.c
23 @@ -4933,7 +4933,7 @@ static int
24  linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
25  {
26    unsigned long text, text_end, data;
27 -  int pid = lwpid_of (get_thread_lwp (current_inferior));
28 +  int pid = lwpid_of (current_inferior);
29  
30    errno = 0;
31  
32 -- 
33 1.9.3
34