{"thread":{"id":"36050","subject":"git compile with debug symbols","startedAt":"2014-03-04T15:46:04Z","lastAt":"2014-03-05T06:27:00Z","messageCount":8,"participants":["Mahesh Pujari","David Kastrup","karthik nayak","Matthieu Moy","Tanay Abhra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"235999","messageId":"1393947964.16150.YahooMailNeo@web162902.mail.bf1.yahoo.com","threadId":"36050","inReplyTo":null,"subject":"git compile with debug symbols","fromName":"Mahesh Pujari","fromEmail":"pujarimahesh_kumar@yahoo.com","sentAt":"2014-03-04T15:46:04Z","receivedAt":"2014-03-04T15:46:04Z","isPatch":false,"sender":{"key":"pujarimahesh_kumar@yahoo.com","avatar":null},"body":"\n\nHello,\n I am trying to compile git with debug symbols and failed to do so (basically I am a noob), can some one direct me to links or mailing list (have searched but couldn't find) or doc's so that I can debug git using gdb.\n\nthanks,\nmpujari\n"},{"id":"236000","messageId":"87a9d6hsf3.fsf@fencepost.gnu.org","threadId":"36050","inReplyTo":"1393947964.16150.YahooMailNeo@web162902.mail.bf1.yahoo.com","subject":"Re: git compile with debug symbols","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2014-03-04T15:53:04Z","receivedAt":"2014-03-04T15:53:04Z","isPatch":false,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Mahesh Pujari <pujarimahesh_kumar@yahoo.com> writes:\n\n> Hello,\n>  I am trying to compile git with debug symbols and failed to do so\n> (basically I am a noob), can some one direct me to links or mailing\n> list (have searched but couldn't find) or doc's so that I can debug\n> git using gdb.\n\ngit is compiled with debug symbols by default.\n\n-- \nDavid Kastrup\n"},{"id":"236002","messageId":"CAOLa=ZRAtOkLAQS89G59=KHvCvuBQ_ptU1ACSqh==ww29-7NKg@mail.gmail.com","threadId":"36050","inReplyTo":"1393947964.16150.YahooMailNeo@web162902.mail.bf1.yahoo.com","subject":"Re: git compile with debug symbols","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2014-03-04T16:00:38Z","receivedAt":"2014-03-04T16:00:38Z","isPatch":false,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"A quick look at the Makefile shows that -g is enabled by default. so\ndebugging is enabled by default\n\nOn Tue, Mar 4, 2014 at 9:16 PM, Mahesh Pujari\n<pujarimahesh_kumar@yahoo.com> wrote:\n>\n>\n> Hello,\n>  I am trying to compile git with debug symbols and failed to do so (basically I am a noob), can some one direct me to links or mailing list (have searched but couldn't find) or doc's so that I can debug git using gdb.\n>\n> thanks,\n> mpujari\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"236003","messageId":"vpqtxbene6o.fsf@anie.imag.fr","threadId":"36050","inReplyTo":"87a9d6hsf3.fsf@fencepost.gnu.org","subject":"Re: git compile with debug symbols","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2014-03-04T16:03:59Z","receivedAt":"2014-03-04T16:03:59Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"David Kastrup <dak@gnu.org> writes:\n\n> Mahesh Pujari <pujarimahesh_kumar@yahoo.com> writes:\n>\n>> Hello,\n>>  I am trying to compile git with debug symbols and failed to do so\n>> (basically I am a noob), can some one direct me to links or mailing\n>> list (have searched but couldn't find) or doc's so that I can debug\n>> git using gdb.\n>\n> git is compiled with debug symbols by default.\n\n... but:\n\n1) some Git commands are shell-scripts, on which you can't use gdb.\n\n2) some Git commands fork other commands, and then you have to deal with\n   multiple processes (i.e. putting a breakpoint in a piece of code\n   executed by the subprocess won't work if gdb is running on the other\n   one).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"236006","messageId":"1393950801.57403.YahooMailNeo@web162903.mail.bf1.yahoo.com","threadId":"36050","inReplyTo":"vpqtxbene6o.fsf@anie.imag.fr","subject":"Re: git compile with debug symbols","fromName":"Mahesh Pujari","fromEmail":"pujarimahesh_kumar@yahoo.com","sentAt":"2014-03-04T16:33:21Z","receivedAt":"2014-03-04T16:33:21Z","isPatch":false,"sender":{"key":"pujarimahesh_kumar@yahoo.com","avatar":null},"body":"Thanks David for the reply. I think I need to do more ground work of going through how to use gdb.\nBasically I am java programmer and I was trying out to debug git source using eclipse CDT and as we do in java, I was trying out to set break point but failed with errors as \"No line 396 in file \"help.c\"\".\nAnd using gdb too I end up with same error.\n\n# (gdb) break help.c:396\n# No line 396 in file \"help.c\".\n\n\nAm I missing something.\n\nthanks,\nmpujari\n\n\nOn Tuesday, March 4, 2014 9:34 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:\nDavid Kastrup <dak@gnu.org> writes:\n\n> Mahesh Pujari <pujarimahesh_kumar@yahoo.com> writes:\n>\n>> Hello,\n>>  I am trying to compile git with debug symbols and failed to do so\n>> (basically I am a noob), can some one direct me to links or mailing\n>> list (have searched but couldn't find) or doc's so that I can debug\n>> git using gdb.\n>\n> git is compiled with debug symbols by default.\n\n... but:\n\n1) some Git commands are shell-scripts, on which you can't use gdb.\n\n2) some Git commands fork other commands, and then you have to deal with\n   multiple processes (i.e. putting a breakpoint in a piece of code\n   executed by the subprocess won't work if gdb is running on the other\n\n   one).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"236007","messageId":"8761ntj4ny.fsf@fencepost.gnu.org","threadId":"36050","inReplyTo":"1393950801.57403.YahooMailNeo@web162903.mail.bf1.yahoo.com","subject":"Re: git compile with debug symbols","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2014-03-04T16:43:13Z","receivedAt":"2014-03-04T16:43:13Z","isPatch":false,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Mahesh Pujari <pujarimahesh_kumar@yahoo.com> writes:\n\n> Thanks David for the reply. I think I need to do more ground work of\n> going through how to use gdb.\n> Basically I am java programmer and I was trying out to debug git\n> source using eclipse CDT and as we do in java, I was trying out to set\n> break point but failed with errors as \"No line 396 in file \"help.c\"\".\n> And using gdb too I end up with same error.\n>\n> # (gdb) break help.c:396\n> # No line 396 in file \"help.c\".\n>\n>\n> Am I missing something.\n\nThere is just no line 396 known to gdb.  It seems like you are\nindicating a function header.  That's not code.  Either take the\nfunction _name_ rather than a line number (that's usually most reliable)\nor take the first line of actual code.\n\n-- \nDavid Kastrup\n"},{"id":"236012","messageId":"loom.20140304T184714-119@post.gmane.org","threadId":"36050","inReplyTo":"1393947964.16150.YahooMailNeo@web162902.mail.bf1.yahoo.com","subject":"Re: git compile with debug symbols","fromName":"Tanay Abhra","fromEmail":"tanayabh@gmail.com","sentAt":"2014-03-04T17:53:25Z","receivedAt":"2014-03-04T17:53:25Z","isPatch":false,"sender":{"key":"tanayabh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2097229?v=4"},"body":"Mahesh Pujari <pujarimahesh_kumar <at> yahoo.com> writes:\n\n> \n> \n> Hello,\n>  I am trying to compile git with debug symbols and failed to do so\n(basically I am a noob), can some one direct\n> me to links or mailing list (have searched but couldn't find) or doc's so\nthat I can debug git using gdb.\n> \n> thanks,\n> mpujari\n> \n> \n\n\nHi,\n\nI tried to put a break point at help.c:396 and it was successful . I think\nthat the problem is either your symbols are not loaded.\nNevertheless I will walk you through the steps.\n\n$ git clone https://github.com/git/git\n$ make\n$ gdb ./git\n$(gdb)> gdb break help.c:396\nBreakpoint 1 at 0x80f8b40: file help.c, line 396.\n\nCheers,\nTanay Abhra.\n"},{"id":"236070","messageId":"1394000820.21154.YahooMailNeo@web162905.mail.bf1.yahoo.com","threadId":"36050","inReplyTo":"8761ntj4ny.fsf@fencepost.gnu.org","subject":"Re: git compile with debug symbols","fromName":"Mahesh Pujari","fromEmail":"pujarimahesh_kumar@yahoo.com","sentAt":"2014-03-05T06:27:00Z","receivedAt":"2014-03-05T06:27:00Z","isPatch":false,"sender":{"key":"pujarimahesh_kumar@yahoo.com","avatar":null},"body":"Hello all,\n Thanks for replying back, figured out (offcourse had to search in net) that 'gdb' version I had was 6.7.1 (OS Ubuntu 12.04 LST), not sure how I got this. Then I upgraded gdb to version 7.4-2012.04 and things got going.\n\n\nthanks,\nmpujari\n\n\nOn Tuesday, March 4, 2014 10:13 PM, David Kastrup <dak@gnu.org> wrote:\nMahesh Pujari <pujarimahesh_kumar@yahoo.com> writes:\n\n> Thanks David for the reply. I think I need to do more ground work of\n> going through how to use gdb.\n> Basically I am java programmer and I was trying out to debug git\n> source using eclipse CDT and as we do in java, I was trying out to set\n> break point but failed with errors as \"No line 396 in file \"help.c\"\".\n> And using gdb too I end up with same error.\n>\n> # (gdb) break help.c:396\n> # No line 396 in file \"help.c\".\n>\n>\n> Am I missing something.\n\nThere is just no line 396 known to gdb.  It seems like you are\nindicating a function header.  That's not code.  Either take the\nfunction _name_ rather than a line number (that's usually most reliable)\nor take the first line of actual code.\n\n\n-- \nDavid Kastrup\n"}]}