<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/ddb/db_expr.c, branch releng/15.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>sys: Automated cleanup of cdefs and other formatting</title>
<updated>2023-11-27T05:24:00+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-24T20:12:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fdafd315ad0d0f28a11b9fb4476a9ab059c62b92'/>
<id>fdafd315ad0d0f28a11b9fb4476a9ab059c62b92</id>
<content type='text'>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:36+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=685dc743dc3b5645e34836464128e1c0558b404b'/>
<id>685dc743dc3b5645e34836464128e1c0558b404b</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>fix style nit: space after if</title>
<updated>2021-05-05T21:26:09+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-05-05T21:26:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=097e8701c9fc0d56caa8c9dad64a77d8ffa1cf2c'/>
<id>097e8701c9fc0d56caa8c9dad64a77d8ffa1cf2c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: provide panicky version of __unreachable</title>
<updated>2020-05-13T18:07:37+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-05-13T18:07:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c79cee71363ddaeb3c5ab7d3ccb87a11e1860d95'/>
<id>c79cee71363ddaeb3c5ab7d3ccb87a11e1860d95</id>
<content type='text'>
__builtin_unreachable doesn't raise any compile-time warnings/errors on its
own, so problems with its usage can't be easily detected. While it would be
nice for this situation to change and compilers to at least add a warning
for trivial cases where local state means the instruction can't be reached,
this isn't the case at the moment and likely will not happen.

This commit adds an __assert_unreachable, whose intent is incredibly clear:
it asserts that this instruction is unreachable. On INVARIANTS builds, it's
a panic(), and on non-INVARIANTS it expands to  __unreachable().

Existing users of __unreachable() are converted to __assert_unreachable,
to improve debuggability if this assumption is violated.

Reviewed by:	mjg
Differential Revision:	https://reviews.freebsd.org/D23793
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__builtin_unreachable doesn't raise any compile-time warnings/errors on its
own, so problems with its usage can't be easily detected. While it would be
nice for this situation to change and compilers to at least add a warning
for trivial cases where local state means the instruction can't be reached,
this isn't the case at the moment and likely will not happen.

This commit adds an __assert_unreachable, whose intent is incredibly clear:
it asserts that this instruction is unreachable. On INVARIANTS builds, it's
a panic(), and on non-INVARIANTS it expands to  __unreachable().

Existing users of __unreachable() are converted to __assert_unreachable,
to improve debuggability if this assumption is violated.

Reviewed by:	mjg
Differential Revision:	https://reviews.freebsd.org/D23793
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDX: Consider code from Carnegie-Mellon University.</title>
<updated>2017-11-30T15:48:35+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-30T15:48:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=796df753f404f4772ae0fd7da0e1d2b948268448'/>
<id>796df753f404f4772ae0fd7da0e1d2b948268448</id>
<content type='text'>
Interesting cases, most likely from CMU Mach sources.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Interesting cases, most likely from CMU Mach sources.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix right shifts on arches with db_expr_t larger than u_int (LP64 arches</title>
<updated>2017-03-18T07:01:18+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>2017-03-18T07:01:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=82b93348dbf8bdec46460bbf09953f463b1ef9fe'/>
<id>82b93348dbf8bdec46460bbf09953f463b1ef9fe</id>
<content type='text'>
in practice).

db_expr_t is a signed type, but right shifts are fudged to evaluate
them in an unsigned type, and the unsigned type was broken by hard-
coding it as 'unsigned', so casting to it lost the top bits on arches
with db_expr_t larger than u_int.

The unsigned type with the same size as db_expr_t is not declared;
assume that db_addr_t gives it.  Fixing this properly is less important
than using the correct type for db_expr_t (originally always long for
C90, but always intmax_t since C99).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in practice).

db_expr_t is a signed type, but right shifts are fudged to evaluate
them in an unsigned type, and the unsigned type was broken by hard-
coding it as 'unsigned', so casting to it lost the top bits on arches
with db_expr_t larger than u_int.

The unsigned type with the same size as db_expr_t is not declared;
assume that db_addr_t gives it.  Fixing this properly is less important
than using the correct type for db_expr_t (originally always long for
C90, but always intmax_t since C99).
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand error messages: print symbol names, parentheses and shift tokens,</title>
<updated>2016-08-28T19:33:09+00:00</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>2016-08-28T19:33:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=27a465b0339f1140b8b40148d268431050cf0d1b'/>
<id>27a465b0339f1140b8b40148d268431050cf0d1b</id>
<content type='text'>
and negative shift counts.

Fix error messages: print "Division" instead of "Divide"; print
multiplier-like, addition-like and logical operator tokens instead of
garbage (usually the command name).

ddb has a primitive lexer with excessive information hiding that makes
it hard to find even the point in the line where a syntax error is
detected.  Old ddb just printed "Syntax error" and this was unimproved
in most places by printing a garbage token.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and negative shift counts.

Fix error messages: print "Division" instead of "Divide"; print
multiplier-like, addition-like and logical operator tokens instead of
garbage (usually the command name).

ddb has a primitive lexer with excessive information hiding that makes
it hard to find even the point in the line where a syntax error is
detected.  Old ddb just printed "Syntax error" and this was unimproved
in most places by printing a garbage token.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a small set of logical operators to DDB command language.</title>
<updated>2016-05-16T19:42:38+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-05-16T19:42:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c69cee69f9886806e57d9b08337d565b2bdf8298'/>
<id>c69cee69f9886806e57d9b08337d565b2bdf8298</id>
<content type='text'>
This are based on Mach3.
Documentation is pending but has been promised.

Submitted by:	Dan Partelly
Reviewed by:	adrian, jhb (older version)

Differential Revision:	https://reviews.freebsd.org/D4230
RelNotes:	yes
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This are based on Mach3.
Documentation is pending but has been promised.

Submitted by:	Dan Partelly
Reviewed by:	adrian, jhb (older version)

Differential Revision:	https://reviews.freebsd.org/D4230
RelNotes:	yes
</pre>
</div>
</content>
</entry>
<entry>
<title>ddb: Make use of our roundup() macro when available.</title>
<updated>2016-04-26T01:52:35+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-04-26T01:52:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fc891c1907eb4123f5f2574eb15e4cce22537c79'/>
<id>fc891c1907eb4123f5f2574eb15e4cce22537c79</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ddb: finish converting boolean values.</title>
<updated>2015-05-21T15:16:18+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2015-05-21T15:16:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cd508278c11d046bf7ce79ca39f6aabeb8c77f36'/>
<id>cd508278c11d046bf7ce79ca39f6aabeb8c77f36</id>
<content type='text'>
The replacement started at r283088 was necessarily incomplete without
replacing boolean_t with bool.  This also involved cleaning some type
mismatches and ansifying old C function declarations.

Pointed out by:	bde
Discussed with:	bde, ian, jhb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The replacement started at r283088 was necessarily incomplete without
replacing boolean_t with bool.  This also involved cleaning some type
mismatches and ansifying old C function declarations.

Pointed out by:	bde
Discussed with:	bde, ian, jhb
</pre>
</div>
</content>
</entry>
</feed>
