Remote debugging of gdb in Ubuntu -- warning: Couldnotloadvsyscallpagebecausenoexecutablewasspecified solution

Source: Internet
Author: User
Remote debugging of gdb in Ubuntu -- warning: Couldnotloadvsyscallpagebecausenoexecutablewasspecified solution 1. first install gdbserverapt-getinstallgdbserver2. compile-g program gcc-gtest_gdb. remote debugging of gdb in Ubuntu -- warning: cocould not load vsyscall page because no executable was specified solution 1. first install gdbserver apt-get install gdbserver 2. compile the-g program gcc-g test_gdb.c-o test_gdb source code as follows: # include "Util. h "void p1 () {int j = 0; char * p; * p = '5'; printf (" % p % c", P, * p); do {j ++;} while (j <10);} void p2 () {int j = 0; while (j <20) {j = j + j * j ;}} int main (int argc, char ** argv) {CreateGerneralThread (p1); CreateGerneralThread (p2); while (1) {sleep (1) ;}return 0 ;}3. run the following statement on the server: gdbserver 192.168.110.138: 9002. /test_gdb will show the following sentence tiger @ ubuntu:/mnt/hgfs/e/Lessons/MyExercise/UtilLibs/THREAD $ gdbserver 192.168.115.250: 9002. /test_gdbProcess. /test_gdb Created; pid = 23562 Listening on port 9002 execute the following statements on the client: 1. gdb displays the following: [root @ localhost ~] # Gdb GNU gdb (GDB) Fedora (7.3.50.20151122-9. fc16) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3 +: gnu gpl version 3 or later 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-redhat-linux-gnu ". for bug reporting instructions, please see: . (Gdb) target remote 192.168.115.250: 9001 Remote debugging using 192.168.115.250: 9001 warning: cocould not load vsyscall page because no executable was specifiedtry using the "file" command failed in ?? () 2. execute: target remote: 192.168.115.250: 9002 3. execute: symbol-file remote: 192.168.115.250: 9002 4. you can call commands such as continue and break.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.