I want to debug the nginx program with gdb, but there is a problem in the process. Could you take a look at it?
Operation flow
1. First, the-g parameter of make is configured to make cc-g
2.gdb objs/nginx start debugging
3.b src/core/nginx.c:91 break point to the first line of the function, and there must be
question
1. Sometimes the breakpoint is invalid and elusive, and I feel that I have used a fake gdb, such as entering the r command, and the execution is completed without interruption. Use print var, to say
(gdb) print argc
No symbol "argc" in current context.
The 2.list parameter shows the file source code, but it shows this:
(gdb) list
1 /* Startup code compliant to the ELF x86-64 ABI.
2 Copyright (C) 2001-2012 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Andreas Jaeger <aj@suse.de>, 2001.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
(gdb) list main
No line number known for main.
according to the configuration of directory, on the Internet, it still can"t be solved. Do I use
?(gdb) directory src/core/