<feed xmlns='http://www.w3.org/2005/Atom'>
<title>OpenOCD/src/helper, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.amat.us/openocd/atom/src/helper?h=master</id>
<link rel='self' href='https://git.amat.us/openocd/atom/src/helper?h=master'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/'/>
<updated>2020-03-07T15:30:05Z</updated>
<entry>
<title>helper/binarybuffer: fix clang static analyzer warnings</title>
<updated>2020-03-07T15:30:05Z</updated>
<author>
<name>Tomas Vanek</name>
<email>vanekt@fbl.cz</email>
</author>
<published>2019-12-20T22:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=a2e822834df52efef5e1bbcb91a6eb1afbf102db'/>
<id>urn:sha1:a2e822834df52efef5e1bbcb91a6eb1afbf102db</id>
<content type='text'>
Writing bits to an uninitialized buffer generated false warnings.
Zero buffers before setting them by buf_set_u32|64()
(do it only if bit-by-bit copy loop is used,
zeroed buffer is not necessary if a fast path write is used)

Change-Id: I2f7f8ddb45b0cbd08d3e249534fc51f4b5cc6694
Signed-off-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
Reviewed-on: http://openocd.zylin.com/5383
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson &lt;andreas.fritiofson@gmail.com&gt;
</content>
</entry>
<entry>
<title>coding style: fix space around pointer's asterisk</title>
<updated>2020-02-24T10:30:36Z</updated>
<author>
<name>Antonio Borneo</name>
<email>borneo.antonio@gmail.com</email>
</author>
<published>2019-05-05T19:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=e7306d361b5d503cf27dfb3dc69298ddad495f88'/>
<id>urn:sha1:e7306d361b5d503cf27dfb3dc69298ddad495f88</id>
<content type='text'>
The script checkpatch available in new Linux kernel offers an
experimental feature for automatically fix the code in place.
While still experimental, the feature works quite well for simple
fixes, like spacing.

This patch has been created automatically with the script under
review for inclusion in OpenOCD, using the command
	find src/ -type f -exec ./tools/scripts/checkpatch.pl \
	-q --types POINTER_LOCATION --fix-inplace -f {} \;
then manually reviewed.

OpenOCD coding style does not mention the space around pointer's
asterisk, so no check is enforced. This patch only makes the style
uniform across the files.

The patch only changes amount and position of whitespace, thus
the following commands show empty diff
	git diff -w
	git log -w -p
	git log -w --stat

Change-Id: Iefb4998e69bebdfe0d1ae65cadfc8d2c4f166d13
Signed-off-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/5197
Tested-by: jenkins
</content>
</entry>
<entry>
<title>log: let command "log_output" to set back its default</title>
<updated>2020-02-24T10:30:10Z</updated>
<author>
<name>Antonio Borneo</name>
<email>borneo.antonio@gmail.com</email>
</author>
<published>2019-06-14T08:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=86d8c05eb68866297cbc1ec5f90d3d1634c69a1e'/>
<id>urn:sha1:86d8c05eb68866297cbc1ec5f90d3d1634c69a1e</id>
<content type='text'>
The default log output is stderr. After the command "log_output"
has been used to set an output log file, it is possible to return
back to stderr only on *NIX hosts specifying a new log output file
as "/dev/stderr", but this is not intuitive, not documented and
not portable out of *NIX.

Make command "log_output" able to set back the default output to
stderr when the parameter is either "default" or is missing.
While there, add debug message to log the change and make the
command return error on incorrect syntax.

Change-Id: I8c7c929780f58e2c23936737c8e7274a96734786
Signed-off-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/5233
Tested-by: jenkins
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
<entry>
<title>jtag_vpi: multiple improvements</title>
<updated>2020-01-02T21:22:33Z</updated>
<author>
<name>Jan Matyas</name>
<email>matyas@codasip.com</email>
</author>
<published>2019-10-21T06:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=deff24afa13fe5188c207258d6d1935bc3dd0870'/>
<id>urn:sha1:deff24afa13fe5188c207258d6d1935bc3dd0870</id>
<content type='text'>
- Fix: Proper handling of read_socket() and write_socket()
in case of "partial" read/write.

- Added low-level JTAG IO debug capability (_DEBUG_JTAG_IO_)

- Zero-fill packet buffers, avoid sending pieces of uninitialized
memory over the network (memset struct vpi_cmd)

- Use close_socket() instead of close() - needed for Win32

- Fixed usage messages of jtag_vpi_command_handlers

Change-Id: I8bd19bc5c9512fe8e798600212e8a95213f50f5b
Signed-off-by: Jan Matyas &lt;matyas@codasip.com&gt;
Reviewed-on: http://openocd.zylin.com/5177
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson &lt;andreas.fritiofson@gmail.com&gt;
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
<entry>
<title>helper/command: remove unused field in struct command_registration</title>
<updated>2019-12-19T20:43:08Z</updated>
<author>
<name>Antonio Borneo</name>
<email>borneo.antonio@gmail.com</email>
</author>
<published>2019-06-07T13:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=90bd7d148225efa587d8e62017625709a1ac002d'/>
<id>urn:sha1:90bd7d148225efa587d8e62017625709a1ac002d</id>
<content type='text'>
The field jim_handler_data in struct command_registration is never
assigned, thus has always value NULL. It was added in commit
17a9dea53a71 ("add jim_handler to command_registration") on Nov 23
2009, together with the homonym field jim_handler_data in struct
command, but never used since then.
Only the field jim_handler_data in struct command is used.

Remove the field from struct command_registration and use NULL
where it was referenced (or remove the assignment if the recipient
is already zero, e.g. allocated with calloc()).

Removing the field decreases the total size of OpenOCD binary by
only 4944 byte on a 64 bit x86. Not a significant improvement from
this point of view.

Change-Id: I9f1d281e3de6b2eb398e2d883c5e9ff92628aecd
Signed-off-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/5225
Tested-by: jenkins
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
<entry>
<title>server: gdb_server: fix memory map generation on a 32-bit BE host</title>
<updated>2019-12-10T10:43:03Z</updated>
<author>
<name>Paul Fertser</name>
<email>fercerpav@gmail.com</email>
</author>
<published>2019-11-06T16:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=1e427fd580ad94bb3bf29d4e02ef81361c920f28'/>
<id>urn:sha1:1e427fd580ad94bb3bf29d4e02ef81361c920f28</id>
<content type='text'>
Due to lack of printf format check wrong specifier was used and it
actually broke operation on a 32-bit BE host.

So fix this and add the necessary function attributes so that the bugs
like that can be uncovered automaticaly.

Reported and pinpointed by Karl Palsson on IRC.

Change-Id: I254ec28fcd9bb30594d607f74a6dba5456c2c7a1
Tested-by: Karl Palsson &lt;karlp@tweak.net.au&gt;
Signed-off-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/5342
Tested-by: jenkins
Reviewed-by: Karl Palsson &lt;karlp@tweak.net.au&gt;
Reviewed-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
</content>
</entry>
<entry>
<title>helper: skip including sys/sysctl.h on Linux</title>
<updated>2019-11-23T22:47:33Z</updated>
<author>
<name>Antonio Borneo</name>
<email>borneo.antonio@gmail.com</email>
</author>
<published>2019-10-08T09:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=be365730732231e0733353834b56f405a8219f2a'/>
<id>urn:sha1:be365730732231e0733353834b56f405a8219f2a</id>
<content type='text'>
Starting from glibc 2.30, the header file sys/sysctl.h gets
deprecated on Linux, after the commit 744e82963716 ("Linux:
Deprecate &lt;sys/sysctl.h&gt; and sysctl")
	https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=744e82963716

The associated NEWS reports
	The Linux-specific &lt;sys/sysctl.h&gt; header and the sysctl
	function have been deprecated and will be removed from a
	future version of glibc.

Latest automake 1.16.1 still does not handle this case.
Current OpenOCD build fails with warning and requires configure
with "--disable-werror" to build.

Prevent including sys/sysctl.h on Linux build.

Change-Id: I5310976573352a96e5aef123352f73475f0c35fe
Signed-off-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/5317
Tested-by: jenkins
Reviewed-by: Moritz Fischer &lt;moritz.fischer.private@gmail.com&gt;
Reviewed-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
</content>
</entry>
<entry>
<title>helper/command: clear errno before calling parser</title>
<updated>2019-09-24T04:47:18Z</updated>
<author>
<name>Christopher Head</name>
<email>chead@zaber.com</email>
</author>
<published>2019-09-09T20:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=31a3324b68827ed7fd6c545d04373b63bd828d6b'/>
<id>urn:sha1:31a3324b68827ed7fd6c545d04373b63bd828d6b</id>
<content type='text'>
The C standard says that errno is set to ERANGE if an out-of-range value
is returned by strtol, strtoul, et. al., but it does not say that errno
is cleared if the function is successful (and, indeed, it is not on
glibc). This means that, if errno is ERANGE before strtol is called, and
if the value to be converted is exactly the maximum (or, for a signed
conversion, the minimum) legal value, COMMAND_PARSE_NUMBER will
erroneously indicate that the value is out of range.

Change-Id: I8a8b50a815b408a38235968f1c1d70297ea1a6aa
Signed-off-by: Christopher Head &lt;chead@zaber.com&gt;
Reviewed-on: http://openocd.zylin.com/5298
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI &lt;tarek.bouchkati@gmail.com&gt;
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
<entry>
<title>helper/options: simplify the code using command_run_linef()</title>
<updated>2019-06-20T18:50:38Z</updated>
<author>
<name>Antonio Borneo</name>
<email>borneo.antonio@gmail.com</email>
</author>
<published>2019-06-08T15:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=a521d93b7a2763a9dcc50e8cae0f037a24f4bfa1'/>
<id>urn:sha1:a521d93b7a2763a9dcc50e8cae0f037a24f4bfa1</id>
<content type='text'>
Thanks to command_run_linef() there is no need to pre-build the
command using alloc_printf().

Change-Id: Iccfebd6063d1ac162f090fe2309b1f51bebf0214
Signed-off-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/5226
Tested-by: jenkins
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
<entry>
<title>helper/command: make command_run_line reentrant</title>
<updated>2019-06-20T18:50:22Z</updated>
<author>
<name>Christopher Head</name>
<email>chead@zaber.com</email>
</author>
<published>2019-06-07T18:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=77a8914b7f960a304406ba4fd39b410c50f25be8'/>
<id>urn:sha1:77a8914b7f960a304406ba4fd39b410c50f25be8</id>
<content type='text'>
The `command_run_line` function contains a comment saying it should be
reentrant. However, it isn’t: it NULLs out `current_target_override` and
doesn’t restore it before returning, and it changes the `context`
associated data of the `interp` object and then deletes that associated
data before returning rather than restoring it to its previous value.

Change-Id: I84fd46ef7173f08cf7c57b9a5b76e4986a60816f
Signed-off-by: Christopher Head &lt;chead@zaber.com&gt;
Reviewed-on: http://openocd.zylin.com/5223
Tested-by: jenkins
Reviewed-by: Antonio Borneo &lt;borneo.antonio@gmail.com&gt;
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
</feed>
