# Week 9: Debugging

### PATCH SERIES UPDATE

This week, last patch series version (2) was sent, reviewed, and I have been implementing almost all suggestions in my latest branch.

Comments and suggestions topics were about: commit message amending, one commit splitting and code minor fixes and improvements. Also, the issue about using an enum to represent bisect.c return code values, has arisen again. So this will be included in next version.

After discussing with my mentor some doubts about remaining suggestions, I will send another version (third) to the mailing list and the cycle will start over. Step by step, I am getting closer to integrate these patch series :).

### SOME INSTALLATIONS AND DEBUGGING

Unexpectedly, testing one of my latests commits that was about introducing the alternative subcommand view to visualize, I realized that one of the patches of previous past series didn’t work. This was not detected because git bisect visualize is not called from the Git test suite and that makes sense because this command launches an external graphical tool gitk that helps in following the bisection process.

As the bug seemed to be complicated I installed gdb to debug the code, and set breakpoints. And also I installed gitk in order to test the subcommands properly.

Installation tasks seem easy at first, but at the end you must deal with many problems or errors with your O.S. or your enviroment and it takes a lot of time and headaches to finally have everything working.

After debugging and studying the bug, I found that the problem was in an if condition. It had a wrong evaluation, and code was returning at this point. After solving this and running the command, a crash error appeared. This was because a buffer structure was not correctly initialized, I fixed it and updated the corresponding commit with the solution.

### MY FUTURE PATCH SERIES

This past week, one of my new commits that fixed the call in git bisect--helper run, which I talked about in my previous post, has been squashed with a previous patch series commit. Also some other new commits have been added, commit messages have been amended and also my mentor’s suggestions have been implemented.

The things done as of today are on a branch and are listed below: