|
From: Derek C. <der...@gm...> - 2013-01-08 20:10:33
|
Hello, I have been trying to use Valgrind to debug some code I have developed on FreeBSD 9. I got the following error: --4765-- WARNING: unhandled syscall: 522--4765-- You may be able to write your own handler.--4765-- Read the file README_MISSING_SYSCALL_OR_IOCTL.--4765-- Nevertheless we consider this a bug. Please report--4765-- it at http://valgrind.org/support/bug_reports.html. In my attempt to find out what syscall 522 was, I went to the README page and, though the instructions didnt seem to translate exactly for FreeBSD, I was able to find a line in /usr/incude/sys/syscall.h which was #define SYS_pselect 522 Is that correct to assume that is the syscall that is unhandled? Going with that, I searched the syswrap directory under the coregrind folder for the linux files that may have pselect handled and I found the syswrap-linux.c file had a PRE(sys_pselect6) which I then copied to the syswrap-freebsd.c I also copied the DECL_TEMPLATE from priv_syswrap-linux.h to priv_syswrap-freebsd.h, and finally I copied the LINX_(__NR_pselect6...) line from syswrap-amd64-linux to syswrap-amd64-freebsd.c and changed it to BSDX_ With all of that done, i started trying to recompile valgrind and I get a compilation error about __NR_pselect6 being undecalred in syswrap-freebsd.c Am I missing a step, or doing this completely wrong? Thanks for any help |
|
From: Tom H. <to...@co...> - 2013-01-08 20:31:02
|
On 08/01/13 20:10, Derek Cole wrote: > I have been trying to use Valgrind to debug some code I have developed > on FreeBSD 9. > > I got the following error: > > |--4765-- WARNING: unhandled syscall: 522 > --4765-- You may be able to write your own handler. > --4765-- Read the file README_MISSING_SYSCALL_OR_IOCTL. > --4765-- Nevertheless we considerthis a bug. Please report > --4765-- it at http://valgrind.org/support/bug_reports.html <http://valgrind.org/support/bug_reports.html>. > > > In my attempt to find out what syscall 522 was, I went to the README page and, though the instructions didnt seem > to translate exactly for FreeBSD, I was able to find a line in FreeBSD is not supported in upstream valgrind, so you need to talk to the people that did the FreeBSD port. That's also why there is no mention of FreeBSD in any of our documentation. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Derek C. <der...@gm...> - 2013-01-08 20:49:30
|
Well regardless of the support for FreeBSD specifically, did the methodology I was using to attempt to add support for pselect() to the FreeBSD version that's out there sound like the right approach? I am willing to do the work to finish adding this support, but the documentation is a bit sparse for all but the perfect case, single parameter/return scenario. On Tue, Jan 8, 2013 at 3:30 PM, Tom Hughes <to...@co...> wrote: > On 08/01/13 20:10, Derek Cole wrote: > > I have been trying to use Valgrind to debug some code I have developed >> on FreeBSD 9. >> >> I got the following error: >> >> |--4765-- WARNING: unhandled syscall: 522 >> --4765-- You may be able to write your own handler. >> --4765-- Read the file README_MISSING_SYSCALL_OR_**IOCTL. >> --4765-- Nevertheless we considerthis a bug. Please report >> --4765-- it at http://valgrind.org/support/**bug_reports.html<http://valgrind.org/support/bug_reports.html> < >> http://valgrind.org/support/**bug_reports.html<http://valgrind.org/support/bug_reports.html> >> >. >> >> >> >> In my attempt to find out what syscall 522 was, I went to the README page >> and, though the instructions didnt seem >> to translate exactly for FreeBSD, I was able to find a line in >> > > FreeBSD is not supported in upstream valgrind, so you need to talk to the > people that did the FreeBSD port. That's also why there is no mention of > FreeBSD in any of our documentation. > > Tom > > -- > Tom Hughes (to...@co...) > http://compton.nu/ > |
|
From: Derek C. <der...@gm...> - 2013-01-08 21:08:59
|
For future reference, I did just now get the warnings to go away. I needed to add a line for that parameter in the vki_scnums_freebsd.h file Derek On Tue, Jan 8, 2013 at 3:49 PM, Derek Cole <der...@gm...> wrote: > Well regardless of the support for FreeBSD specifically, did the > methodology I was using to attempt to add support for pselect() to the > FreeBSD version that's out there sound > like the right approach? I am willing to do the work to finish adding this > support, but the documentation is a bit sparse for all but the perfect > case, single parameter/return scenario. > > On Tue, Jan 8, 2013 at 3:30 PM, Tom Hughes <to...@co...> wrote: > >> On 08/01/13 20:10, Derek Cole wrote: >> >> I have been trying to use Valgrind to debug some code I have developed >>> on FreeBSD 9. >>> >>> I got the following error: >>> >>> |--4765-- WARNING: unhandled syscall: 522 >>> --4765-- You may be able to write your own handler. >>> --4765-- Read the file README_MISSING_SYSCALL_OR_**IOCTL. >>> --4765-- Nevertheless we considerthis a bug. Please report >>> --4765-- it at http://valgrind.org/support/**bug_reports.html<http://valgrind.org/support/bug_reports.html> < >>> http://valgrind.org/support/**bug_reports.html<http://valgrind.org/support/bug_reports.html> >>> >. >>> >>> >>> >>> In my attempt to find out what syscall 522 was, I went to the README >>> page and, though the instructions didnt seem >>> to translate exactly for FreeBSD, I was able to find a line in >>> >> >> FreeBSD is not supported in upstream valgrind, so you need to talk to the >> people that did the FreeBSD port. That's also why there is no mention of >> FreeBSD in any of our documentation. >> >> Tom >> >> -- >> Tom Hughes (to...@co...) >> http://compton.nu/ >> > > |