From: Tracy B. <tr...@bo...> - 2007-11-09 12:08:03
|
Hi Dave, I have attached the files i2c-io.c, i2c-io-api.c and i2c-io-api.h. Please let me know if they are not attached for some reason and i will send them to you directly. Tracy http://www.nabble.com/file/p13665737/i2c-io.c i2c-io.c http://www.nabble.com/file/p13665737/i2c-io-api.c i2c-io-api.c http://www.nabble.com/file/p13665737/i2c-io-api.h i2c-io-api.h Dave Hylands wrote: > > Hi Tracy, > > On Nov 8, 2007 3:34 AM, Tracy Booysen <tr...@bo...> wrote: >> >> I am adding a function to the i2c-io code that will take in a byte sent >> by >> the user and put it in a variable, however I am getting a strange >> segmentation fault. I have used the --verbose and --debug commands and >> they >> have been very helpful in allowing me to pinpoint the problem but it >> still >> makes no sense.. >> >> The code below is the function from i2c-io.c it is fine until it enters >> the >> parse byte function and then the segmentation occurs. Since this is the >> same >> format as the writereg for a byte function I cannot see the problem. It >> segments on the line that converts the const char into the byte > > Then that probably means that valStr is bad somehow. I don't see > anything obviously wrong with the ProcessWriteCommand function itself. > Have you double checked bow ProcessWriteCommand is being called? If > you call it the same way as you call ProcessWriteRegCommand, then you > would be passing gRegStr as the 2nd paramater instead of gValStr. > > If possible, send the whole file (i2c-io.c). It's easier to figure out > what's going on. > > -- > Dave Hylands > Vancouver, BC, Canada > http://www.DaveHylands.com/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > -- View this message in context: http://www.nabble.com/i2c-io-segmentation-mystery-tf4770430.html#a13665737 Sent from the Gumstix mailing list archive at Nabble.com. |