|
From: Gabriel G. <go...@co...> - 2003-09-04 18:11:46
|
Dear Valgrind Team:
We're using Valgrind to debug a system. I must tell that it's great
software! It's a great tool for finding memory leaks and other memory
errors such as invalid reads & writes.
We've been using it flawlessly until we found two illegal instruction
errors in valgrind log and our system dies with "Illegal instruction"
message.
1) disInstr: unhandled instruction bytes: 0xEE 0xC9 0xC3 0x55
2) disInstr: unhandled instruction bytes: 0xEC 0x88 0x45 0xFC
I've been searching in Intel Instruction set reference for x86 and it
tells that:
a) 0xEE is OUT I/O instruction
b) 0xEC is IN I/O instruction
1) We're using framebuffer in our system and writing directly to vga
registers with an outb C function (previous call to ioperm) and I think
it dies there.
2) We're using inb C function (previous call to ioperm) to control a
cash drawer on i/o port 0x101.
Our system works perfectly without valgrind, but we are eager to keep
debugging it and this problem is stopping our task. :(
So the question is:
Are this instructions supported in valgrind? If not, is there a complex
technical problem in implementing them? Do you have any pointers to docs
if I decide to give you a hand and implementing them?
Thanks for your time, and keep up this very good software!
PD: Please CC me any replies, cause I'm not subscribed to the list.
--
.^. Gabriel Gomiz - Red Hat Certified Engineer (RHCE)
/V\ Gerencia de Sistemas - Cooperativa Obrera Ltda.
// \\ Tel (0291) 456-0084
/( )\
^^-^^ s/Window[$s]/LINUX!!/g or die;
|
|
From: Dirk M. <dm...@gm...> - 2003-09-05 00:47:16
|
On Thursday 04 September 2003 20:10, Gabriel Gomiz wrote: > Are this instructions supported in valgrind? If not, is there a complex > technical problem in implementing them? Do you have any pointers to docs > if I decide to give you a hand and implementing them? they're currently not supported. Adding support as in "ignore them" would be fairly easy, but correct support is quite difficult. Per principle, valgrind has to know a) that OUT writes a byte / word / dword and that it has to check all the bits it writes for definedness (or ignore some as they don't matter depending on the port?) b) that IN reads a value and makes all its bits defined (but what if not all bits are defined?) |
|
From: Dan K. <da...@ke...> - 2003-09-05 00:52:18
|
Dirk Mueller wrote: > On Thursday 04 September 2003 20:10, Gabriel Gomiz wrote: > > >>Are this instructions supported in valgrind? If not, is there a complex >>technical problem in implementing them? Do you have any pointers to docs >>if I decide to give you a hand and implementing them? > > > they're currently not supported. Adding support as in "ignore them" would be > fairly easy, but correct support is quite difficult. Per principle, valgrind > has to know > > a) that OUT writes a byte / word / dword and that it has to check all the bits > it writes for definedness (or ignore some as they don't matter depending > on the port?) > > b) that IN reads a value and makes all its bits defined (but what if not > all bits are defined?) How 'bout just escaping to the real system for those two instructions, and kludging definedness (e.g. for IN, assume all bits are defined, etc.) - Dan -- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 |
|
From: Dirk M. <dm...@gm...> - 2003-09-28 09:30:41
Attachments:
blinkleds.c
|
On Thursday 04 September 2003 20:10, Gabriel Gomiz wrote: > 1) We're using framebuffer in our system and writing directly to vga > registers with an outb C function (previous call to ioperm) and I think > it dies there. Yes. I've implemented the IN and OUT instructions now in valgrind, it should be in CVS. To test my implementation I wrote a small keyboard led blinker, similiar to the way recent linux kernels blink the keyboard leds when the kernel paniced. This should work now under valgrind producing no valgrind warnings. Please let me know if you experience errors. Disclaimer: Accessing IO ports is dangerous, and a bug in the application or in valgrind could crash your machine and permanently destroy all your data. I don't take any responsibility, try this at your own risk. D |