Remote debugging of gdb in Ubuntu -- warning: cocould not load vsyscall page becaus

Source: Internet
Author: User

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  

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.