[Xapian-devel] debug with simplequery1

Hurricane Tong zhangshangtong.cpp at qq.com
Thu Jun 5 03:46:07 BST 2014


As I wrote in http://trac.xapian.org/wiki/GSoC2014/Posting%20list%20encoding%20improvements/Journal#June4,
I am debugging with a test failure.
I use gdb to track the process of the test simplequery1, 

in api_anydb.cc, L170
// tests the document count for a simple query
DEFINE_TESTCASE(simplequery1, backend) {
    Xapian::Enquire enquire(get_database("apitest_simpledata"));
    Xapian::MSet mymset = enquire.get_mset(0, 10);
    TEST_MSET_SIZE(mymset, 2);
    return true;

I track the process of get_database, and finally arrive at brass_database.cc L121,

    if (readonly) {

But I didn't find the code where the files concerning with test simplequery1 get indexed.
I think all these failures in tests are due to my change of brass_postlist.cc, 
maybe something wrong happen about doc length when files get indexed.
To repair this bug, I want to find, during the test simplequery1, the exact place where doc length information is indexed to database,
but I failed.
When I set a break point at L1556 of brass_postlist.cc( the function merge_doclen_changes ),
I get
(gdb) b brass_postlist.cc:1556
No source file named brass_postlist.cc.

Shangtong Zhang,Second Year Undergraduate,
School of Computer Science,
Fudan University, China.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20140605/9d13adce/attachment.html>

More information about the Xapian-devel mailing list