Zeesh-an commented on issue #986:
URL: https://github.com/apache/age/issues/986#issuecomment-1589113226

   To use GDB (GNU Debugger) to debug AGE source code, follow following steps:
   
   1. Open a new terminal and find the PID of the PostgreSQL (PGSQL) process 
connected to the 'postgres' database using the command: ```ps -ef | grep 
postgres```. Look for the process ID (PID) associated with the 'postgres' 
database.
   2. Start GDB by running ```sudo gdb``` in the terminal.
   3. Attach GDB to the PGSQL process using the PID you found in step 1. In 
GDB, run the command: ```attach <PID>```, replacing <PID> with the actual 
process ID.
   4. Update GDB's search path for the source files. Determine the directory 
where the AGE source files are located, and in GDB, use the command: ```dir 
<source_directory>```, replacing <source_directory> with the actual path to the 
source files.
   Familiarize yourself with GDB commands:
           b <function>: Set a breakpoint at a specific function.
           c: Continue execution until the next breakpoint.
           n: Execute the next line of code.
           s: Step into a function.
           p <variable>: Print the value of a variable.
           bt: Display the current call stack.
           d: Delete all breakpoints.
           list: Show the context (source code) around the current line.
           q: Quit GDB.
   
   Set a breakpoint at the 'parse_cypher' function in the 'cypher_parser.c' 
file using the command: b parse_cypher.
   
   For detailed explanation, 
[documentation](https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_toc.html) 
can help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to