Skip to content

Instantly share code, notes, and snippets.

@norcalli
Created November 12, 2020 21:20
Show Gist options
  • Save norcalli/3ebc086277974144296d48836fd36873 to your computer and use it in GitHub Desktop.
Save norcalli/3ebc086277974144296d48836fd36873 to your computer and use it in GitHub Desktop.
~/works/3rd/wl-clipboard master 585ms
❯ gdb -args wl-paste
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from wl-paste...
(gdb) start
Temporary breakpoint 1 at 0x4ed1: file ../src/wl-paste.c, line 411.
Starting program: /usr/local/bin/wl-paste
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdd68) at ../src/wl-paste.c:411
411 parse_options(argc, argv);
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/bin/wl-paste
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Detaching after fork from child process 2976463]
^C
Program received signal SIGINT, Interrupt.
0x00007ffff7e75eaa in wait4 () from /usr/lib/libc.so.6
(gdb) bt full
#0 0x00007ffff7e75eaa in wait4 () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x0000555555558b6d in selection_callback (offer=0x555555568ec0, primary=0) at ../src/wl-paste.c:271
types = {explicit_available = 0, inferred_available = 0, plain_text_utf8_available = 1, plain_text_available = 1, having_explicit_as_prefix = 0x0,
any_text = 0x555555568f00 "UTF8_STRING", any = 0x555555568f00 "UTF8_STRING"}
mime_type = 0x55555555d008 "text/plain;charset=utf-8"
pipefd = {4, 5}
rc = 0
pid = 2976463
#2 0x000055555555a9e2 in zwlr_data_control_device_v1_selection_handler (data=0x555555569710, device=0x555555569760, offer_proxy=0x5555555697c0) at ../src/types/device.c:239
self = 0x555555569710
offer = 0x555555568ec0
#3 0x00007ffff7da3a8d in ?? () from /usr/lib/libffi.so.7
No symbol table info available.
#4 0x00007ffff7da301b in ?? () from /usr/lib/libffi.so.7
No symbol table info available.
#5 0x00007ffff7f7be92 in ?? () from /usr/lib/libwayland-client.so.0
No symbol table info available.
#6 0x00007ffff7f786c1 in ?? () from /usr/lib/libwayland-client.so.0
No symbol table info available.
#7 0x00007ffff7f79ccc in wl_display_dispatch_queue_pending () from /usr/lib/libwayland-client.so.0
No symbol table info available.
#8 0x0000555555559109 in main (argc=1, argv=0x7fffffffdd68) at ../src/wl-paste.c:473
path = 0x5555555632a0 "\300\032\370\367\377\177"
registry = 0x555555567440
seat = 0x555555569480
device_manager = 0x555555569c90
device = 0x555555569710
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment