Issue 180860
Summary LLDB does not respect standard and auxiliary filters
Labels lldb
Assignees
Reporter mchoo7
    This issue was discovered while working on #180444.

>From https://docs.oracle.com/cd/E19683-01/817-3677/6mj8mbtbr/index.html#chapter4-5:

Source code:
```c
// filtee.c
char * bar = "defined in filtee";

char * foo()
{
        return("defined in filtee");
}
```

```c
// filter.c
char * bar = "defined in filter";

char * foo()
{
 return ("defined in filter");
}
```

```c
// main.c
#include <stdio.h>
extern char * bar, * foo();

int main()
{
        (void) printf("foo is %s: bar is %s\n", foo(), bar);
}
```

Compile:
`gcc -fPIC -shared -o filtee.so.1 filtee.c`
`gcc -fPIC -shared -o filter.so.1 filter.c -Wl,-f,filtee.so.1 -Wl,-h,filter.so.1 -Wl,-rpath,.` (standard)
`gcc -fPIC -shared -o filter.so.1 filter.c -Wl,-F,filtee.so.1 -Wl,-h,filter.so.1 -Wl,-rpath,.` (auxiliary)
`gcc -o prog main.c -Wl,-rpath,. filter.so.1`

Expected Output (gdb):
```console
(gdb) b main
(gdb) r
(gdb) p (char *)foo()
$1 = 0x7ffff7db1218 "defined in filtee"
(gdb) c
Continuing.
foo is defined in filtee: bar is defined in filter
...
```

Real Output (lldb):
```console
(lldb) breakpoint set -n main
(lldb) run
(lldb) print (char *)foo()
(char *) 0x00007ffff7fb8268 "defined in filter"
(lldb) c
Process 4287 resuming
foo is defined in filtee: bar is defined in filter
...
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to