title: Examining C++ objects in gdb backtrace after crash
body: <p>I am learning debugging with GDB and I am not sure what to do.</p>
  
  <p>I run a program inside GDB, that I need to get working, and it crashes with SEGFAULT. When I do <code>backtrace</code> inside GDB, I see this.</p>
  
  <pre><code>(gdb) backtrace
  #0  0x08200100 in boost::shared_ptr&lt;boost::re_detail::basic_regex_implementation&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt; &gt;::get (this=0x2) at /usr/include/boost/smart_ptr/shared_ptr.hpp:668
  #1  0x081f94c3 in boost::basic_regex&lt;char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::get_traits (this=0x2) at /usr/include/boost/regex/v4/basic_regex.hpp:619
  #2  0x081ef769 in boost::re_detail::perl_matcher&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt;, std::allocator&lt;boost::sub_match&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt; &gt; &gt;, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt;::perl_matcher (this=0xb60d3eb4, first=..., end=..., what=..., e=..., 
      f=boost::regex_constants::match_any, l_base=...) at /usr/include/boost/regex/v4/perl_matcher.hpp:372
  #3  0x081e2214 in boost::regex_match&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt;, std::allocator&lt;boost::sub_match&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt; &gt; &gt;, char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt; (first=..., last=..., m=..., e=..., flags=boost::regex_constants::match_any)
      at /usr/include/boost/regex/v4/regex_match.hpp:49
  #4  0x081d43bf in boost::regex_match&lt;std::char_traits&lt;char&gt;, std::allocator&lt;char&gt;, char, boost::regex_traits&lt;char, boost::cpp_regex_traits&lt;char&gt; &gt; &gt; (s=..., e=..., flags=boost::regex_constants::match_default)
      at /usr/include/boost/regex/v4/regex_match.hpp:100
  #5  0x081ca3c1 in [my project] (this=0x2, request=0xb5706630)
      at [source of my project]:127
  [more calls here]
  </code></pre>
  
  <p>Now I want to examine what was inside <code>request</code> at <code>#5</code>, on the line 127. Request is a C-style pointer to C++ object of class <code>request_data</code>, which is defined in my project. The definition of my function is <code>bool match_request(request_data *request) const</code>.</p>
  
  <p>What should I write in <code>gdb</code> to actually get to the content of <code>request</code> as it was before the program segfaulted?</p>