| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLDB uses clang::DeclContexts for lookups, and variables get put into
the DeclContext for their abstract origin. (The abstract origin is a
DWARF pointer that indicates the unique definition of inlined code.)
When the expression parser is looking for variables, it locates the
DeclContext for the current context. This needs to be done carefully,
though, e.g.:
__attribute__ ((always_inline)) void f(int a) {
{
int b = a * 2;
}
}
void g() {
f(3);
}
Here, if we're stopped in the inlined copy of f, we have to find the
DeclContext corresponding to the definition of f – its abstract
origin. Clang doesn't allow multiple functions with the same name and
arguments to exist. It also means that any variables we see must be
placed in the appropriate DeclContext.
[Bug 1]: When stopped in an inline block, the function
GetDeclContextDIEContainingDIE for that block doesn't properly
construct a DeclContext for the abstract origin for inlined
subroutines. That means we get duplicated function DeclContexts, but
function arguments only get put in the abstract origin's DeclContext,
and as a result when we try to look for them in nested contexts they
aren't found.
[Bug 2]: When stopped in an inline block, the DWARF (for space
reasons) doesn't explicitly point to the abstract origin for that
block. This means that the function GetClangDeclContextForDIE returns
a different DeclContext for each place the block is inlined. However,
any variables defined in the block have abstract origins, so they
will only get placed in the DeclContext for their abstract origin.
In this fix, I've introduced a test covering both of these issues,
and fixed them.
Bug 1 could be resolved simply by making sure we look up the abstract
origin for inlined functions when looking up their DeclContexts on
behalf of nested blocks.
For Bug 2, I've implemented an algorithm that makes the DeclContext
for a block be the containing DeclContext for the closest entity we
would find during lookup that has an abstract origin pointer. That
means that in the following situation:
{ // block 1
int a;
{ // block 2
int b;
}
}
if we looked up the DeclContext for block 2, we'd find the block
containing the abstract origin of b, and lookup would proceed
correctly because we'd see b and a. However, in the situation
{ // block 1
int a;
{ // block 2
}
}
since there isn't anything to look up in block 2, we can't determine
its abstract origin (and there is no such pointer in the DWARF for
blocks). However, we can walk up the parent chain and find a, and its
abstract origin lives in the abstract origin of block 1. So we simply
say that the DeclContext for block 2 is the same as the DeclContext
for block 1, which contains a. Lookups will return the same results.
Thanks to Jim Ingham for review and suggestions.
Differential revision: https://reviews.llvm.org/D32375
llvm-svn: 301263
|
|
|
|
|
|
|
| |
- XFAIL on TestNoreturnUnwind on all architectures
- TestStaticVariables fails with clang-3.8 as well
llvm-svn: 301186
|
|
|
|
|
|
| |
we need to call WSAStartup before we can use getaddrinfo.
llvm-svn: 301179
|
|
|
|
|
|
|
| |
The revison https://reviews.llvm.org/D32125 will fixed the off_t for GNU specific 32 bit platform. This fixed the difference in definition of off_t in LLDB and LLVM
Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste, zturner
llvm-svn: 301172
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
the reason for this is two-fold:
- getaddrinfo without the extra arguments will return the same
(network-level) address multiple times, once for each supported
transport protocol, which is not what is usually intended (it certainly
wasn't in D31823)
- it enables us to rewrite the getaddrinfo member function in terms of
the static GetAddressInfo function.
Reviewers: beanz, tberghammer
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D32357
llvm-svn: 301168
|
|
|
|
|
|
| |
Based on NetBSD's Host.cpp. Also tidy up comments to match NetBSD.
llvm-svn: 301100
|
|
|
|
|
|
|
|
| |
Removes Clang warning ThreadSanitizerRuntime.cpp:591:21: warning:
comparison of integers of different signs: 'int' and 'size_t' (aka
'unsigned long') [-Wsign-compare]
llvm-svn: 301067
|
|
|
|
| |
llvm-svn: 301034
|
|
|
|
|
|
|
|
| |
Sometimes you are debugging in source, but you really only want to see
the disassembly. That's easy to do but you have to set a few variables.
This command toggles between your old values, and a disassembly only mode.
llvm-svn: 300902
|
|
|
|
| |
llvm-svn: 300862
|
|
|
|
|
|
|
|
|
| |
Include CheckIncludeFile for check_include_file() in CMake.
Detect <sys/event.h> in CMake.
This header is available on NetBSD.
llvm-svn: 300853
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D32137
llvm-svn: 300845
|
|
|
|
|
|
|
| |
older versions of libc++ (still used on some linux systems) are not
compatible with gcc.
llvm-svn: 300837
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MergeFrom was updating the architecture if the target triple did not
have it set. However, it was leaving the core field as invalid. This
resulted in assertion failures in core file tests as a missing core
meant we were unable to compute the address byte size properly.
Add a unit test for the new behaviour.
Reviewers: jingham, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D32221
llvm-svn: 300836
|
|
|
|
|
|
|
|
| |
The test fails because an older clang did not emit the required debug
info (I am not sure when this got added, but clang-3.7 certainly did not
work yet). The actual platform has nothing to do with this.
llvm-svn: 300834
|
|
|
|
|
|
|
|
| |
I thought my previous commit got the last ones but somehow I missed
these. This also resurrects TestDataFormatterLibcxxSet, which got
commented out in r263859 as a part of some seemingly unrelated change.
llvm-svn: 300833
|
|
|
|
|
|
| |
<rdar://problem/26863256>
llvm-svn: 300810
|
|
|
|
|
|
| |
<rdar://problem/31713267>
llvm-svn: 300785
|
|
|
|
|
|
|
|
| |
From Gregor Milos (gmilos@apple.com), for:
https://reviews.llvm.org/D32078
llvm-svn: 300733
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D32148
llvm-svn: 300729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The runtime discovers contexts through RenderScriptRuntime::Capture*()
methods. These methods see the low-level context representation.
However, the runtime calls APIs that require the high-level context
representation. Therefore, it needs to call yet another API to find
the high-level representation associated with a given low-level
representation.
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D32184
llvm-svn: 300727
|
|
|
|
|
|
|
|
| |
Clang rejects __attribute__((regparm)) when targetting arm. The default
calling convention passes arguments in registers anyway, so we can just
remove them in this case.
llvm-svn: 300670
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The break the linux bots (and probably any other machine which would
run the test suite in a massively parallel way). The problem is that it
can happen that we only successfully create an IPv6 listening socket
(because the relevant IPv4 port is used by another process) and then the
connecting side attempts to connect to the IPv4 port and fails.
It's not very obvious how to fix this problem, so I am reverting this
until we come up with a solution.
llvm-svn: 300669
|
|
|
|
|
|
| |
This enables the kqueue path in MainLoop for Darwin and BSD.
llvm-svn: 300654
|
|
|
|
|
|
| |
This is the last Windows compile error, so... Hit me with your best shot.
llvm-svn: 300647
|
|
|
|
| |
llvm-svn: 300640
|
|
|
|
|
|
| |
This should fix the netbsd bot I just broke.
llvm-svn: 300638
|
|
|
|
|
|
|
|
| |
*fingers crossed*
This might fix the Window bots, but I really don't know...
llvm-svn: 300636
|
|
|
|
|
|
| |
This is needed to make the Xcode project build since it doesn't have auto-generated Config header.
llvm-svn: 300618
|
|
|
|
|
|
| |
This is a little more cleanup from r300579.
llvm-svn: 300615
|
|
|
|
|
|
| |
timespec is not available on Windows, and we should use size_t instead of nfds_t.
llvm-svn: 300610
|
|
|
|
|
|
| |
This is fallout from r300579.
llvm-svn: 300606
|
|
|
|
|
|
| |
This is causing the Windows bot failures.
llvm-svn: 300605
|
|
|
|
|
|
| |
Hopefully this will fix the netbsd bot that I broke...
llvm-svn: 300590
|
|
|
|
|
|
| |
Fixing another error from r300579.
llvm-svn: 300589
|
|
|
|
|
|
| |
This is not ideal, but it should get the bot going again. I'll need to revisit this if we want to get signal handling working on Windows.
llvm-svn: 300587
|
|
|
|
| |
llvm-svn: 300582
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch adds IPv6 support to debugserver. It follows a similar pattern to the changes proposed for LLDB/Host except that the listen implementation is only with kqueue(2) because debugserver is only supported on Darwin.
Reviewers: jingham, jasonmolenda, clayborg
Reviewed By: clayborg
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D31824
llvm-svn: 300580
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds IPv6 support to LLDB/Host's TCP socket implementation. Supporting IPv6 involved a few significant changes to the implementation of the socket layers, and I have performed some significant code cleanup along the way.
This patch changes the Socket constructors for all types of sockets to not create sockets until first use. This is required for IPv6 support because the socket type will vary based on the address you are connecting to. This also has the benefit of removing code that could have errors from the Socket subclass constructors (which seems like a win to me).
The patch also slightly changes the API and behaviors of the Listen/Accept pattern. Previously both Listen and Accept calls took an address specified as a string. Now only listen does. This change was made because the Listen call can result in opening more than one socket. In order to support listening for both IPv4 and IPv6 connections we need to open one AF_INET socket and one AF_INET6 socket. During the listen call we construct a map of file descriptors to addrin structures which represent the allowable incoming connection address. This map removes the need for taking an address into the Accept call.
This does have a change in functionality. Previously you could Listen for connections based on one address, and Accept connections from a different address. This is no longer supported. I could not find anywhere in LLDB where we actually used the APIs in that way. The new API does still support AnyAddr for allowing incoming connections from any address.
The Listen implementation is implemented using kqueue on FreeBSD and Darwin, WSAPoll on Windows and poll(2) everywhere else.
Reviewers: zturner, clayborg
Subscribers: jasonmolenda, labath, lldb-commits, emaste
Differential Revision: https://reviews.llvm.org/D31823
llvm-svn: 300579
|
|
|
|
|
|
|
|
|
|
| |
r285226 dropped the code that did these checks. I am pretty
sure that was inadvertent, so I added that back in and added
a test for it.
<rdar://problem/31661252>
llvm-svn: 300564
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This code offers Debug Registers (80386) model in LLDB/amd64.
This is initial support and has one issue that will be addressed later,
Debug Register trap (TRAP_DBREG) is registered as (TRAP_TRACE)
for unknown reason. On the other hand this works good enough to
move on and leave this bug to be squashed later.
Improve the NativeProcessNetBSD::ReinitializeThreads() function,
stop setting inside it SetStoppedByExec(). This fixes incorrect
stop reason on attaching (SetStoppedBySignal(SIGSTOP)).
This commits also has no functional style improvements from
clang-format.
This code also ships with FXSAVE support on NetBSD.
Demo:
```
$ lldb ./watch
(lldb) target create "./watch"
Current executable set to './watch' (x86_64).
(lldb) b main
Breakpoint 1: where = watch`main + 15 at watch.c:8, address = 0x000000000040087f
(lldb) r
Process 1573 launched: './watch' (x86_64)
Process 1573 stopped
* thread #1, stop reason = breakpoint 1.1
frame #0: 0x000000000040087f watch`main(argc=1, argv=0x00007f7fffa12b88) at watch.c:8
5 {
6 int i, j, k;
7
-> 8 for (i = 0; i < 3; i++)
9 for (j = 0; j < 3; j++)
10 for (k = 0; k < 3; k++)
11 printf("Hello world! i=%d j=%d k=%d\n", i, j, k);
(lldb) watch set var i
Watchpoint created: Watchpoint 1: addr = 0x7f7fffa12b4c size = 4 state = enabled type = w
declare @ '/public/lldb_devel/watch.c:6'
watchpoint spec = 'i'
new value: 0
(lldb) c
Process 1573 resuming
Hello world! i=0 j=0 k=0
Hello world! i=0 j=0 k=1
Hello world! i=0 j=0 k=2
Hello world! i=0 j=1 k=0
Hello world! i=0 j=1 k=1
Hello world! i=0 j=1 k=2
Hello world! i=0 j=2 k=0
Hello world! i=0 j=2 k=1
Hello world! i=0 j=2 k=2
Process 1573 stopped
* thread #1, stop reason = trace
frame #0: 0x00000000004008cc watch`main(argc=1, argv=0x00007f7fffa12b88) at watch.c:8
5 {
6 int i, j, k;
7
-> 8 for (i = 0; i < 3; i++)
9 for (j = 0; j < 3; j++)
10 for (k = 0; k < 3; k++)
11 printf("Hello world! i=%d j=%d k=%d\n", i, j, k)
```
FPR (in another program using libm)
```
(lldb) register read --all
General Purpose Registers:
rax = 0x000000000000001c
rbx = 0x00007f7fff1d4fe0
rcx = 0x000000000000000c
rdx = 0x0000000000000002
rdi = 0x0000746711d5b018 __sF + 152
rsi = 0x0000000000000001
rbp = 0x00007f7fff1d3d80
rsp = 0x00007f7fff1d3d60
r8 = 0x00007f7fff1d3470
r9 = 0x0000000000000000
r10 = 0x0000000000000001
r11 = 0x0000000000000202
r12 = 0x00007f7fff1d3da0
r13 = 0x00007d8ad2d88500
r14 = 0x0000000000000002
r15 = 0x00007f7fffa627e0
rip = 0x00000000004009e9 fpr`main + 217 at fpr.c:15
rflags = 0x0000000000000202
cs = 0x0000000000000047
fs = 0x0000000000000000
gs = 0x0000000000000000
ss = 0x000000000000003f
ds = 0x000000000000003f
es = 0x000000000000003f
eax = 0x0000001c
ebx = 0xff1d4fe0
ecx = 0x0000000c
edx = 0x00000002
edi = 0x11d5b018
esi = 0x00000001
ebp = 0xff1d3d80
esp = 0xff1d3d60
r8d = 0xff1d3470
r9d = 0x00000000
r10d = 0x00000001
r11d = 0x00000202
r12d = 0xff1d3da0
r13d = 0xd2d88500
r14d = 0x00000002
r15d = 0xffa627e0
ax = 0x001c
bx = 0x4fe0
cx = 0x000c
dx = 0x0002
di = 0xb018
si = 0x0001
bp = 0x3d80
sp = 0x3d60
r8w = 0x3470
r9w = 0x0000
r10w = 0x0001
r11w = 0x0202
r12w = 0x3da0
r13w = 0x8500
r14w = 0x0002
r15w = 0x27e0
ah = 0x00
bh = 0x4f
ch = 0x00
dh = 0x00
al = 0x1c
bl = 0xe0
cl = 0x0c
dl = 0x02
dil = 0x18
sil = 0x01
bpl = 0x80
spl = 0x60
r8l = 0x70
r9l = 0x00
r10l = 0x01
r11l = 0x02
r12l = 0xa0
r13l = 0x00
r14l = 0x02
r15l = 0xe0
unknown:
fctrl = 0x037f
fstat = 0x0220
ftag = 0x00
fop = 0x0000
fiseg = 0x11e1a52c
fioff = 0x11e1a52c
foseg = 0xff1d3d54
fooff = 0xff1d3d54
mxcsr = 0x00001fa0
mxcsrmask = 0x0000ffff
st0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
st7 = {0xa5 0xdb 0x2d 0xbd 0x93 0xae 0xb9 0xfe 0xfe 0x3f}
mm0 = 0x3fe9d13800000000
mm1 = 0x3e0485fcce89c000
mm2 = 0x3fefd735e0000000
mm3 = 0x0000000000000000
mm4 = 0x3fe0000000000000
mm5 = 0x3fe00000005217f3
mm6 = 0x0000000000000000
mm7 = 0x3fefd735e0000000
xmm0 = {0x00 0x00 0x00 0x00 0x38 0xd1 0xe9 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm1 = {0x00 0xc0 0x89 0xce 0xfc 0x85 0x04 0x3e 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm2 = {0x00 0x00 0x00 0xe0 0x35 0xd7 0xef 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm4 = {0x00 0x00 0x00 0x00 0x00 0x00 0xe0 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm5 = {0xf3 0x17 0x52 0x00 0x00 0x00 0xe0 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm7 = {0x00 0x00 0x00 0xe0 0x35 0xd7 0xef 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm8 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm9 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm10 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm11 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm12 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm13 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm14 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
xmm15 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
dr0 = 0x0000000000000000
dr1 = 0x0000000000000000
dr2 = 0x0000000000000000
dr3 = 0x0000000000000000
dr4 = 0x0000000000000000
dr5 = 0x0000000000000000
dr6 = 0x00000000ffff0ff0
dr7 = 0x0000000000000400
22 registers were unavailable.
```
Sponsored by <The NetBSD Foundation>
Reviewers: labath, emaste, joerg, kettenis
Reviewed By: labath
Subscribers: #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D32080
llvm-svn: 300548
|
|
|
|
| |
llvm-svn: 300519
|
|
|
|
| |
llvm-svn: 300517
|
|
|
|
|
|
|
|
|
| |
PlatformRemoveDarwinDevice class, subclassed to those three so they can
provide their specific information.
<rdar://problem/30159764>
llvm-svn: 300512
|
|
|
|
| |
llvm-svn: 300476
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D32087
llvm-svn: 300455
|
|
|
|
|
|
| |
races are displayed.
llvm-svn: 300416
|
|
|
|
| |
llvm-svn: 300386
|
|
|
|
|
|
|
|
| |
The attribute was fairly dubious as: a) we shouldn't tell the compiler
when to inline functions, b) GCC complains that the function may be
not always inlinable.
llvm-svn: 300377
|
|
|
|
|
|
|
| |
reg0 is always zero and comparison to an unsigned always yields
true.
llvm-svn: 300375
|