[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: empty mergeinfo produced by svn_mergeinfo_inheritable

From: Mark Eichin <eichin_at_gmail.com>
Date: Fri, 24 Oct 2008 19:28:03 -0400

> cooking up a bunch of gdb macros

forgot to include: these are based on the apache macros from
https://svn.apache.org/repos/asf/httpd/httpd/trunk/.gdbinit (since the
relevant svn data structures are just apr_hash_t or apr_array_t with
specific typed values.) They're kind of verbose because as far as I
can tell, gdb macros don't have any scoping at all, and would
otherwise collide with each other...

define dump_merge_range_t_array
    set $dmrta_a = (char **)((apr_array_header_t *)$arg0)->elts
    set $dmrta_n = (int)((apr_array_header_t *)$arg0)->nelts
    set $dmrta_i = 0
    printf "%u elts in merge_range\n", $dmrta_n
    while $dmrta_i < $dmrta_n
        printf "[%u] ", $dmrta_i
        p *(svn_merge_range_t*)$dmrta_a[$dmrta_i]
        set $dmrta_i = $dmrta_i + 1
    end
end
document dump_merge_range_t_array
    Print all the merge_range_t array in a mergeinfo_t
end

define dump_mergeinfo_t
    echo $arg0:
    set $dmt_h = $arg0->array
    set $dmt_n = $arg0->max
    set $dmt_i = 0
    printf "%u/%u counted in mergeinfo_t\n", $arg0->count, $dmt_n
    while $dmt_i < $dmt_n
             set $dmt_ent = $dmt_h[$dmt_i]
        while $dmt_ent != (void*)0L
             printf "%d -> %s\n", $dmt_i, $dmt_ent->key
             # $dmt_ent->val is an apr_array_header_t...
             dump_merge_range_t_array $dmt_ent->val
             set $dmt_ent = $dmt_ent->next
        end
        set $dmt_i = $dmt_i + 1
    end
end
document dump_mergeinfo_t
   print contents of svn_mergeinfo_t
end

define dump_mergeinfo_catalog_t
    echo $arg0:
    set $dmct_h = $arg0->array
    set $dmct_n = $arg0->max
    set $dmct_i = 0
    printf "%u/%u counted in mergeinfo_t\n", $arg0->count, $dmct_n
    while $dmct_i < $dmct_n
        set $dmct_ent = $dmct_h[$dmct_i]
        while $dmct_ent != (void*)0L
             printf "%d -> %s\n", $dmct_i, $dmct_ent->key
             dump_mergeinfo_t ((svn_mergeinfo_t)$dmct_ent->val)
             set $dmct_ent = $dmct_ent->next
        end
        set $dmct_i = $dmct_i + 1
    end
end
document dump_mergeinfo_catalog_t
   print contents of svn_mergeinfo_catalog_t
end

-- 
_Mark_ <eichin_at_metacarta.com> <eichin_at_gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-25 01:28:25 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.