• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gdb/7.10.1/0004-xtensa-implement-NPTL-helpers.patch
Max FilippovMax Filippov committed cce31bca69110 Mar 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
@@ -3273,6 +3274,9 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
1
From d4eb69fc4b50f9a0babd70b28d0601b40f31bd0f Mon Sep 17 00:00:00 2001
2
From: Max Filippov <jcmvbkbc@gmail.com>
3
Date: Thu, 2 Jul 2015 15:10:58 +0300
4
Subject: [PATCH] xtensa: implement NPTL helpers
5
​
6
These changes allow debugging multithreaded NPTL xtensa applications.
7
​
8
2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
9
gdb/gdbserver/
10
    * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
11
    * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
12
    #includes.
13
    (ps_get_thread_area): New function.
14
​
15
2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
16
gdb/
17
    * arch/xtensa.h: New file.
18
    * xtensa-linux-nat.c (gdb_proc_service.h): New #include.
19
    (ps_get_thread_area): New function.
20
    * xtensa-linux-tdep.c (xtensa_linux_init_abi): Add call to
21
    set_gdbarch_fetch_tls_load_module_address to enable TLS support.
22
    * xtensa-tdep.c (osabi.h): New #include.
23
    (xtensa_gdbarch_init): Call gdbarch_init_osabi to register
24
    xtensa-specific hooks.
25
    * xtensa-tdep.h (struct xtensa_elf_gregset_t): Add threadptr
26
    member and move the structure to arch/xtensa.h.
27
​
28
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
29
---
30
Backported from: 40045d91812b25c88c8275b8c08d27c234b68ba8
31
Changes to ChangeLog files are dropped.
32
​
33
 gdb/arch/xtensa.h                | 46 ++++++++++++++++++++++++++++++++++++++++
34
 gdb/gdbserver/configure.srv      |  1 +
35
 gdb/gdbserver/linux-xtensa-low.c | 21 ++++++++++++++++++
36
 gdb/xtensa-linux-nat.c           | 22 ++++++++++++++++++
37
 gdb/xtensa-linux-tdep.c          |  4 ++++
38
 gdb/xtensa-tdep.c                |  4 ++++
39
 gdb/xtensa-tdep.h                | 24 ++------------------
40
 7 files changed, 100 insertions(+), 22 deletions(-)
41
 create mode 100644 gdb/arch/xtensa.h
42
​
43
diff --git a/gdb/arch/xtensa.h b/gdb/arch/xtensa.h
44
new file mode 100644
45
index 0000000..fe96584
46
--- /dev/null
47
+++ b/gdb/arch/xtensa.h
48
@@ -0,0 +1,46 @@
49
+/* Common Target-dependent code for the Xtensa port of GDB, the GNU debugger.
50
+
51
+   Copyright (C) 2003-2015 Free Software Foundation, Inc.
52
+
53
+   This file is part of GDB.
54
+
55
+   This program is free software; you can redistribute it and/or modify
56
+   it under the terms of the GNU General Public License as published by
57
+   the Free Software Foundation; either version 3 of the License, or
58
+   (at your option) any later version.
59
+
60
+   This program is distributed in the hope that it will be useful,
61
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
62
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
63
+   GNU General Public License for more details.
64
+
65
+   You should have received a copy of the GNU General Public License
66
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
67
+
68
+#ifndef XTENSA_H
69
+#define XTENSA_H
70
+
71
+/* Xtensa ELF core file register set representation ('.reg' section).
72
+   Copied from target-side ELF header <xtensa/elf.h>.  */
73
+
74
+typedef uint32_t xtensa_elf_greg_t;
75
+
76
+typedef struct
77
+{
78
+  xtensa_elf_greg_t pc;
79
+  xtensa_elf_greg_t ps;
80
+  xtensa_elf_greg_t lbeg;
81
+  xtensa_elf_greg_t lend;
82
+  xtensa_elf_greg_t lcount;
83
+  xtensa_elf_greg_t sar;
84
+  xtensa_elf_greg_t windowstart;
85
+  xtensa_elf_greg_t windowbase;
86
+  xtensa_elf_greg_t threadptr;
87
+  xtensa_elf_greg_t reserved[7+48];
88
+  xtensa_elf_greg_t ar[64];
89
+} xtensa_elf_gregset_t;
90
+
91
+#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \
92
+             / sizeof (xtensa_elf_greg_t))
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.