bneradt opened a new pull request, #12255:
URL: https://github.com/apache/trafficserver/pull/12255

   This adds a gdb pretty-printer for the HttpSM history (or other History) 
variables. It does the following:
   
   * Prints the entries in order, handling the wrapping of the circular buffer 
as necessary,
   * Prints a human readable version of the events.
   * Filers out set_next_state and the state_api_call* functions since they 
don't seem to add much value.
   
   Example (run from a frame in HttpSM):
   
   ```
   (gdb) source ~bneradt/gdb-helpers.py
   (gdb) p history
   $50 = History(capacity=65, history_pos=124, num_entries=65) = {
     HttpSM.cc:5025            do_cache_lookup_and_read                         
  TS_EVENT_NONE (0)                                       reent=     22,
     HttpSM.cc:2088            state_send_server_request_header                 
  TS_EVENT_VCONN_WRITE_COMPLETE (103)                     reent=      1,
     HttpSM.cc:6361            do_setup_client_request_body_tunnel              
  NO_EVENT (34463)                                        reent=      1,
     HttpSM.cc:1903            state_read_server_response_header                
  TS_EVENT_VCONN_EOS (104)                                reent=      1,
     HttpCacheSM.cc:104        state_cache_open_read                            
  TS_EVENT_CACHE_OPEN_READ_FAILED (1103)                  reent= -31073,
     HttpSM.cc:2568            state_cache_open_read                            
  TS_EVENT_CACHE_OPEN_READ_FAILED (1103)                  reent=     15,
     HttpSM.cc:5025            do_cache_lookup_and_read                         
  TS_EVENT_NONE (0)                                       reent=     14,
     HttpSM.cc:1770            state_http_server_open                           
  TS_EVENT_VCONN_EOS (104)                                reent=      1
   }
   ```


-- 
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: github-unsubscr...@trafficserver.apache.org

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

Reply via email to