URL:
  <http://gna.org/bugs/?18661>

                 Summary: Create Pretty Printers for wesnoth data types in
gdb
                 Project: Battle for Wesnoth
            Submitted by: thonsew
            Submitted on: Thu 15 Sep 2011 08:17:34 PM GMT
                Category: Feature Request
                Severity: 1 - Wish
                Priority: 5 - Normal
              Item Group:  None of the others
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.9.9svn+
        Operating System: linux

    _______________________________________________________

Details:

I'd like to have pretty printers for wesnoth data types in gdb so that this:

(gdb) p /r this->variables_
$16 = {
  values = {
    table_ = {
     
<boost::unordered_detail::hash_table<boost::unordered_detail::map<n_token::t_token,
boost::hash<n_token::t_token>, std::equal_to<n_token::t_token>,
std::allocator<std::pair<n_token::t_token const, config::attribute_value> > >
>> = {
       
<boost::unordered_detail::hash_buckets<std::allocator<std::pair<n_token::t_token
const, config::attribute_value> >, boost::unordered_detail::ungrouped>> = {
          buckets_ = 0x336e670, 
          bucket_count_ = 17, 
          allocators_ = {
           
<boost::details::compressed_pair_imp<std::allocator<boost::unordered_detail::hash_bucket<std::allocator<std::pair<n_token::t_token
const, config::attribute_value> > > >,
std::allocator<boost::unordered_detail::hash_node<std::allocator<std::pair<n_token::t_token
const, config::attribute_value> >, boost::unordered_detail::ungrouped> >, 3>>
= {


...


becomes this:

p this->variables_
$22 = {
  values = "boost::unordered_map" = {
    "multifloor_system_enabled" = "NULL",
    "current_floor" = "int 3",
    "y2" = "int 23",
    "side_number" = "int 1",
    "x2" = "int 15",
    "limit_for_addition" = "double 75",
    "turn_number" = "int 2",
    "floor4_shroud" = "NULL",
    "x1" = "int 15",
    "y1" = "int 22",
    "damage_inflicted" = "int 4",
    "floor_4_enabled" = "NULL"
  }, 
  children = "boost::unordered_map" = {
    "unit_memo_def" = std::vector of length 1, capacity 1 = {0x70f2fd0},
    "mf_tod" = std::vector of length 1, capacity 1 = {0x63c3d60},
    "unit" = std::vector of length 1, capacity 1 = {0x70f34f0}
  }, 
  ordered_children = std::vector of length 3, capacity 4 = {{
      pos = std::vector of length 1, capacity 1 = {}, 
      index = "NULL"
    }, {
      pos = std::vector of length 1, capacity 1 = {}, 
      index = "NULL"
    }, {
      pos = std::vector of length 1, capacity 1 = {}, 
      index = "NULL"
    }}
}

which is much easier to read.





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?18661>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to