summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibC/stdio.cpp2
-rw-r--r--Libraries/LibC/ulimit.cpp2
-rw-r--r--Libraries/LibC/unistd.cpp2
-rw-r--r--Libraries/LibCore/Gzip.cpp14
-rw-r--r--Libraries/LibCore/LocalServer.cpp4
-rw-r--r--Libraries/LibCore/LocalSocket.cpp2
-rw-r--r--Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp2
-rw-r--r--Libraries/LibCrypto/PK/RSA.cpp22
-rw-r--r--Libraries/LibDiff/Hunks.cpp6
-rw-r--r--Libraries/LibGUI/AbstractView.cpp6
-rw-r--r--Libraries/LibGUI/ColumnsView.cpp4
-rw-r--r--Libraries/LibGUI/Widget.cpp6
-rw-r--r--Libraries/LibGemini/GeminiJob.cpp4
-rw-r--r--Libraries/LibGemini/Job.cpp4
-rw-r--r--Libraries/LibGfx/GIFLoader.cpp6
-rw-r--r--Libraries/LibGfx/JPGLoader.cpp2
-rw-r--r--Libraries/LibGfx/PNGLoader.cpp4
-rw-r--r--Libraries/LibHTTP/HttpJob.cpp2
-rw-r--r--Libraries/LibHTTP/HttpsJob.cpp4
-rw-r--r--Libraries/LibHTTP/Job.cpp12
-rw-r--r--Libraries/LibImageDecoderClient/Client.cpp6
-rw-r--r--Libraries/LibLine/Editor.cpp6
-rw-r--r--Libraries/LibMarkdown/Text.cpp4
-rw-r--r--Libraries/LibProtocol/Download.cpp2
-rw-r--r--Libraries/LibRegex/RegexMatcher.cpp2
-rw-r--r--Libraries/LibRegex/Tests/Regex.cpp12
-rw-r--r--Libraries/LibTLS/ClientHandshake.cpp108
-rw-r--r--Libraries/LibTLS/Exchange.cpp30
-rw-r--r--Libraries/LibTLS/Record.cpp28
-rw-r--r--Libraries/LibTLS/Socket.cpp8
-rw-r--r--Libraries/LibTLS/TLSv12.cpp72
-rw-r--r--Libraries/LibTTF/Font.cpp30
-rw-r--r--Libraries/LibVT/Terminal.cpp4
-rw-r--r--Libraries/LibWeb/CSS/Parser/CSSParser.cpp6
-rw-r--r--Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp4
-rw-r--r--Libraries/LibWeb/DOM/Node.cpp2
-rw-r--r--Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp2
-rw-r--r--Libraries/LibWeb/Loader/Resource.cpp2
-rw-r--r--Libraries/LibWeb/SVG/SVGPathElement.cpp2
-rw-r--r--Libraries/LibWeb/WebContentClient.cpp4
40 files changed, 222 insertions, 222 deletions
diff --git a/Libraries/LibC/stdio.cpp b/Libraries/LibC/stdio.cpp
index a8a0cfc022..99d6f15a1a 100644
--- a/Libraries/LibC/stdio.cpp
+++ b/Libraries/LibC/stdio.cpp
@@ -624,7 +624,7 @@ int feof(FILE* stream)
int fflush(FILE* stream)
{
if (!stream) {
- dbg() << "FIXME: fflush(nullptr) should flush all open streams";
+ dbgln("FIXME: fflush(nullptr) should flush all open streams");
return 0;
}
return stream->flush() ? 0 : EOF;
diff --git a/Libraries/LibC/ulimit.cpp b/Libraries/LibC/ulimit.cpp
index 0bd284c538..1ab9b7dc3a 100644
--- a/Libraries/LibC/ulimit.cpp
+++ b/Libraries/LibC/ulimit.cpp
@@ -39,7 +39,7 @@ long ulimit([[maybe_unused]] int cmd, [[maybe_unused]] long newlimit)
int getrusage([[maybe_unused]] int who, [[maybe_unused]] struct rusage* usage)
{
- dbg() << "LibC: getrusage is not implemented";
+ dbgln("LibC: getrusage is not implemented");
return -1;
}
}
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index f3595e8fc1..de5838be4a 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -138,7 +138,7 @@ int execvpe(const char* filename, char* const argv[], char* const envp[])
}
}
errno_rollback.set_override_rollback_value(ENOENT);
- dbg() << "execvpe() leaving :(";
+ dbgln("execvpe() leaving :(");
return -1;
}
diff --git a/Libraries/LibCore/Gzip.cpp b/Libraries/LibCore/Gzip.cpp
index 4b5b868460..268e9a4702 100644
--- a/Libraries/LibCore/Gzip.cpp
+++ b/Libraries/LibCore/Gzip.cpp
@@ -55,12 +55,12 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data)
};
#ifdef DEBUG_GZIP
- dbg() << "get_gzip_payload: Skipping over gzip header.";
+ dbgln("get_gzip_payload: Skipping over gzip header.");
#endif
// Magic Header
if (read_byte() != 0x1F || read_byte() != 0x8B) {
- dbg() << "get_gzip_payload: Wrong magic number.";
+ dbgln("get_gzip_payload: Wrong magic number.");
return Optional<ByteBuffer>();
}
@@ -85,21 +85,21 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data)
// FNAME
if (flags & 8) {
- dbg() << "get_gzip_payload: Header has FNAME flag set.";
+ dbgln("get_gzip_payload: Header has FNAME flag set.");
while (read_byte() != '\0')
;
}
// FCOMMENT
if (flags & 16) {
- dbg() << "get_gzip_payload: Header has FCOMMENT flag set.";
+ dbgln("get_gzip_payload: Header has FCOMMENT flag set.");
while (read_byte() != '\0')
;
}
// FHCRC
if (flags & 2) {
- dbg() << "get_gzip_payload: Header has FHCRC flag set.";
+ dbgln("get_gzip_payload: Header has FHCRC flag set.");
current += 2;
}
@@ -142,7 +142,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data)
if (puff_ret == 0) {
#ifdef DEBUG_GZIP
- dbg() << "Gzip::decompress: Decompression success.";
+ dbgln("Gzip::decompress: Decompression success.");
#endif
destination.trim(destination_len);
break;
@@ -151,7 +151,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data)
if (puff_ret == 1) {
// FIXME: Find a better way of decompressing without needing to try over and over again.
#ifdef DEBUG_GZIP
- dbg() << "Gzip::decompress: Output buffer exhausted. Growing.";
+ dbgln("Gzip::decompress: Output buffer exhausted. Growing.");
#endif
destination.grow(destination.size() * 2);
} else {
diff --git a/Libraries/LibCore/LocalServer.cpp b/Libraries/LibCore/LocalServer.cpp
index 8b41ddcf21..092cf82388 100644
--- a/Libraries/LibCore/LocalServer.cpp
+++ b/Libraries/LibCore/LocalServer.cpp
@@ -78,11 +78,11 @@ bool LocalServer::take_over_from_system_server()
} else {
if (rc != 0)
perror("fstat");
- dbg() << "It's not a socket, what the heck??";
+ dbgln("It's not a socket, what the heck??");
}
}
- dbg() << "Failed to take the socket over from SystemServer";
+ dbgln("Failed to take the socket over from SystemServer");
return false;
}
diff --git a/Libraries/LibCore/LocalSocket.cpp b/Libraries/LibCore/LocalSocket.cpp
index 65a38d8de6..d49aa1d166 100644
--- a/Libraries/LibCore/LocalSocket.cpp
+++ b/Libraries/LibCore/LocalSocket.cpp
@@ -88,7 +88,7 @@ RefPtr<LocalSocket> LocalSocket::take_over_accepted_socket_from_system_server()
if (rc < 0 || !S_ISSOCK(stat.st_mode)) {
if (rc != 0)
perror("fstat");
- dbg() << "ERROR: The fd we got from SystemServer is not a socket";
+ dbgln("ERROR: The fd we got from SystemServer is not a socket");
return nullptr;
}
diff --git a/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp b/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp
index 92d0bd90f6..9f6e49ef45 100644
--- a/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp
+++ b/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp
@@ -221,7 +221,7 @@ UnsignedBigInteger LCM(const UnsignedBigInteger& a, const UnsignedBigInteger& b)
GCD_without_allocation(a, b, temp_a, temp_b, temp_1, temp_2, temp_3, temp_4, temp_quotient, temp_remainder, gcd_output);
if (gcd_output == 0) {
#ifdef NT_DEBUG
- dbg() << "GCD is zero";
+ dbgln("GCD is zero");
#endif
return output;
}
diff --git a/Libraries/LibCrypto/PK/RSA.cpp b/Libraries/LibCrypto/PK/RSA.cpp
index 5f1de4c039..d1ca1ab629 100644
--- a/Libraries/LibCrypto/PK/RSA.cpp
+++ b/Libraries/LibCrypto/PK/RSA.cpp
@@ -85,7 +85,7 @@ RSA::KeyPairType RSA::parse_rsa_key(ReadonlyBytes in)
ASN1::Kind::Integer, 1, &n)) {
// that's no key
// that's a death star
- dbg() << "that's a death star";
+ dbgln("that's a death star");
return keypair;
}
@@ -105,7 +105,7 @@ RSA::KeyPairType RSA::parse_rsa_key(ReadonlyBytes in)
}
if (n == 1) {
// multiprime key, we don't know how to deal with this
- dbg() << "Unsupported key type";
+ dbgln("Unsupported key type");
return keypair;
}
// it's a broken public key
@@ -120,7 +120,7 @@ void RSA::encrypt(ReadonlyBytes in, Bytes& out)
#endif
auto in_integer = UnsignedBigInteger::import_data(in.data(), in.size());
if (!(in_integer < m_public_key.modulus())) {
- dbg() << "value too large for key";
+ dbgln("value too large for key");
out = {};
return;
}
@@ -175,7 +175,7 @@ void RSA::import_private_key(ReadonlyBytes bytes, bool pem)
auto key = parse_rsa_key(bytes);
if (!key.private_key.length()) {
- dbg() << "We expected to see a private key, but we found none";
+ dbgln("We expected to see a private key, but we found none");
ASSERT_NOT_REACHED();
}
m_private_key = key.private_key;
@@ -191,7 +191,7 @@ void RSA::import_public_key(ReadonlyBytes bytes, bool pem)
auto key = parse_rsa_key(bytes);
if (!key.public_key.length()) {
- dbg() << "We expected to see a public key, but we found none";
+ dbgln("We expected to see a public key, but we found none");
ASSERT_NOT_REACHED();
}
m_public_key = key.public_key;
@@ -235,12 +235,12 @@ void RSA_PKCS1_EME::encrypt(ReadonlyBytes in, Bytes& out)
dbg() << "key size: " << mod_len;
#endif
if (in.size() > mod_len - 11) {
- dbg() << "message too long :(";
+ dbgln("message too long :(");
out = out.trim(0);
return;
}
if (out.size() < mod_len) {
- dbg() << "output buffer too small";
+ dbgln("output buffer too small");
return;
}
@@ -303,14 +303,14 @@ void RSA_PKCS1_EME::decrypt(ReadonlyBytes in, Bytes& out)
++offset;
if (offset == out.size()) {
- dbg() << "garbage data, no zero to split padding";
+ dbgln("garbage data, no zero to split padding");
return;
}
++offset;
if (offset - 3 < 8) {
- dbg() << "PS too small";
+ dbgln("PS too small");
return;
}
@@ -319,11 +319,11 @@ void RSA_PKCS1_EME::decrypt(ReadonlyBytes in, Bytes& out)
void RSA_PKCS1_EME::sign(ReadonlyBytes, Bytes&)
{
- dbg() << "FIXME: RSA_PKCS_EME::sign";
+ dbgln("FIXME: RSA_PKCS_EME::sign");
}
void RSA_PKCS1_EME::verify(ReadonlyBytes, Bytes&)
{
- dbg() << "FIXME: RSA_PKCS_EME::verify";
+ dbgln("FIXME: RSA_PKCS_EME::verify");
}
}
}
diff --git a/Libraries/LibDiff/Hunks.cpp b/Libraries/LibDiff/Hunks.cpp
index c7828c2f64..d806b2b386 100644
--- a/Libraries/LibDiff/Hunks.cpp
+++ b/Libraries/LibDiff/Hunks.cpp
@@ -80,14 +80,14 @@ Vector<Hunk> parse_hunks(const String& diff)
#ifdef DEBUG_HUNKS
for (const auto& hunk : hunks) {
- dbg() << "Hunk location:";
+ dbgln("Hunk location:");
dbg() << "orig: " << hunk.original_start_line;
dbg() << "target: " << hunk.target_start_line;
- dbg() << "removed:";
+ dbgln("removed:");
for (const auto& line : hunk.removed_lines) {
dbg() << "- " << line;
}
- dbg() << "added:";
+ dbgln("added:");
for (const auto& line : hunk.added_lines) {
dbg() << "+ " << line;
}
diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp
index d74e630cd1..701733cb07 100644
--- a/Libraries/LibGUI/AbstractView.cpp
+++ b/Libraries/LibGUI/AbstractView.cpp
@@ -308,7 +308,7 @@ void AbstractView::mousemove_event(MouseEvent& event)
// Prevent this by just ignoring later drag initiations (until the current drag operation ends).
TemporaryChange dragging { m_is_dragging, true };
- dbg() << "Initiate drag!";
+ dbgln("Initiate drag!");
auto drag_operation = DragOperation::construct();
drag_operation->set_mime_data(m_model->mime_data(m_selection));
@@ -317,10 +317,10 @@ void AbstractView::mousemove_event(MouseEvent& event)
switch (outcome) {
case DragOperation::Outcome::Accepted:
- dbg() << "Drag was accepted!";
+ dbgln("Drag was accepted!");
break;
case DragOperation::Outcome::Cancelled:
- dbg() << "Drag was cancelled!";
+ dbgln("Drag was cancelled!");
break;
default:
ASSERT_NOT_REACHED();
diff --git a/Libraries/LibGUI/ColumnsView.cpp b/Libraries/LibGUI/ColumnsView.cpp
index e0c061a546..7e702f9abb 100644
--- a/Libraries/LibGUI/ColumnsView.cpp
+++ b/Libraries/LibGUI/ColumnsView.cpp
@@ -192,7 +192,7 @@ void ColumnsView::push_column(const ModelIndex& parent_index)
}
// Add the new column.
- dbg() << "Adding a new column";
+ dbgln("Adding a new column");
m_columns.append({ parent_index, 0 });
update_column_sizes();
update();
@@ -278,7 +278,7 @@ void ColumnsView::model_did_update(unsigned flags)
AbstractView::model_did_update(flags);
// FIXME: Don't drop the columns on minor updates.
- dbg() << "Model was updated; dropping columns :(";
+ dbgln("Model was updated; dropping columns :(");
m_columns.clear();
m_columns.append({ {}, 0 });
diff --git a/Libraries/LibGUI/Widget.cpp b/Libraries/LibGUI/Widget.cpp
index 04e8249e69..0a83919af5 100644
--- a/Libraries/LibGUI/Widget.cpp
+++ b/Libraries/LibGUI/Widget.cpp
@@ -968,14 +968,14 @@ bool Widget::load_from_json(const JsonObject& json)
auto layout_value = json.get("layout");
if (!layout_value.is_null() && !layout_value.is_object()) {
- dbg() << "layout is not an object";
+ dbgln("layout is not an object");
return false;
}
if (layout_value.is_object()) {
auto& layout = layout_value.as_object();
auto class_name = layout.get("class");
if (class_name.is_null()) {
- dbg() << "Invalid layout class name";
+ dbgln("Invalid layout class name");
return false;
}
@@ -1001,7 +1001,7 @@ bool Widget::load_from_json(const JsonObject& json)
auto& child_json = child_json_value.as_object();
auto class_name = child_json.get("class");
if (!class_name.is_string()) {
- dbg() << "No class name in entry";
+ dbgln("No class name in entry");
return false;
}
auto* registration = WidgetClassRegistration::find(class_name.as_string());
diff --git a/Libraries/LibGemini/GeminiJob.cpp b/Libraries/LibGemini/GeminiJob.cpp
index 7e5863be00..afba44932d 100644
--- a/Libraries/LibGemini/GeminiJob.cpp
+++ b/Libraries/LibGemini/GeminiJob.cpp
@@ -42,7 +42,7 @@ void GeminiJob::start()
m_socket->set_root_certificates(m_override_ca_certificates ? *m_override_ca_certificates : DefaultRootCACertificates::the().certificates());
m_socket->on_tls_connected = [this] {
#ifdef GEMINIJOB_DEBUG
- dbg() << "GeminiJob: on_connected callback";
+ dbgln("GeminiJob: on_connected callback");
#endif
on_socket_connected();
};
@@ -97,7 +97,7 @@ void GeminiJob::read_while_data_available(Function<IterationDecision()> read)
void GeminiJob::set_certificate(String certificate, String private_key)
{
if (!m_socket->add_client_key(certificate.bytes(), private_key.bytes())) {
- dbg() << "LibGemini: Failed to set a client certificate";
+ dbgln("LibGemini: Failed to set a client certificate");
// FIXME: Do something about this failure
ASSERT_NOT_REACHED();
}
diff --git a/Libraries/LibGemini/Job.cpp b/Libraries/LibGemini/Job.cpp
index 8c6265de26..c260951e70 100644
--- a/Libraries/LibGemini/Job.cpp
+++ b/Libraries/LibGemini/Job.cpp
@@ -68,7 +68,7 @@ void Job::on_socket_connected()
m_sent_data = true;
auto raw_request = m_request.to_raw_request();
#ifdef JOB_DEBUG
- dbg() << "Job: raw_request:";
+ dbgln("Job: raw_request:");
dbg() << String::copy(raw_request).characters();
#endif
bool success = write(raw_request);
@@ -153,7 +153,7 @@ void Job::on_socket_connected()
if (!is_established()) {
#ifdef JOB_DEBUG
- dbg() << "Connection appears to have closed, finishing up";
+ dbgln("Connection appears to have closed, finishing up");
#endif
finish_up();
}
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp
index 10375ee35f..aad9c6d6ed 100644
--- a/Libraries/LibGfx/GIFLoader.cpp
+++ b/Libraries/LibGfx/GIFLoader.cpp
@@ -357,7 +357,7 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
Optional<u16> code = decoder.next_code();
if (!code.has_value()) {
#ifdef GIF_DEBUG
- dbg() << "Unexpectedly reached end of gif frame data";
+ dbgln("Unexpectedly reached end of gif frame data");
#endif
return false;
}
@@ -506,7 +506,7 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
if (extension_type == 0xF9) {
if (sub_block.size() != 4) {
#ifdef GIF_DEBUG
- dbg() << "Unexpected graphic control size";
+ dbgln("Unexpected graphic control size");
#endif
continue;
}
@@ -536,7 +536,7 @@ static bool load_gif_frame_descriptors(GIFLoadingContext& context)
if (sub_block[11] != 1) {
#ifdef GIF_DEBUG
- dbg() << "Unexpected application extension format";
+ dbgln("Unexpected application extension format");
#endif
continue;
}
diff --git a/Libraries/LibGfx/JPGLoader.cpp b/Libraries/LibGfx/JPGLoader.cpp
index 61b4bcc3a9..124dadae4d 100644
--- a/Libraries/LibGfx/JPGLoader.cpp
+++ b/Libraries/LibGfx/JPGLoader.cpp
@@ -273,7 +273,7 @@ static Optional<u8> get_next_symbol(HuffmanStreamState& hstream, const HuffmanTa
}
#ifdef JPG_DEBUG
- dbg() << "If you're seeing this...the jpeg decoder needs to support more kinds of JPEGs!";
+ dbgln("If you're seeing this...the jpeg decoder needs to support more kinds of JPEGs!");
#endif
return {};
}
diff --git a/Libraries/LibGfx/PNGLoader.cpp b/Libraries/LibGfx/PNGLoader.cpp
index 6d6492aa56..bbb9b44103 100644
--- a/Libraries/LibGfx/PNGLoader.cpp
+++ b/Libraries/LibGfx/PNGLoader.cpp
@@ -528,7 +528,7 @@ static bool decode_png_header(PNGLoadingContext& context)
if (!context.data || context.data_size < sizeof(png_header)) {
#ifdef PNG_DEBUG
- dbg() << "Missing PNG header";
+ dbgln("Missing PNG header");
#endif
context.state = PNGLoadingContext::State::Error;
return false;
@@ -536,7 +536,7 @@ static bool decode_png_header(PNGLoadingContext& context)
if (memcmp(context.data, png_header, sizeof(png_header)) != 0) {
#ifdef PNG_DEBUG
- dbg() << "Invalid PNG header";
+ dbgln("Invalid PNG header");
#endif
context.state = PNGLoadingContext::State::Error;
return false;
diff --git a/Libraries/LibHTTP/HttpJob.cpp b/Libraries/LibHTTP/HttpJob.cpp
index 9013ea1862..87db14756d 100644
--- a/Libraries/LibHTTP/HttpJob.cpp
+++ b/Libraries/LibHTTP/HttpJob.cpp
@@ -40,7 +40,7 @@ void HttpJob::start()
m_socket = Core::TCPSocket::construct(this);
m_socket->on_connected = [this] {
#ifdef CHTTPJOB_DEBUG
- dbg() << "HttpJob: on_connected callback";
+ dbgln("HttpJob: on_connected callback");
#endif
on_socket_connected();
};
diff --git a/Libraries/LibHTTP/HttpsJob.cpp b/Libraries/LibHTTP/HttpsJob.cpp
index 20e50d9503..ab12ee971a 100644
--- a/Libraries/LibHTTP/HttpsJob.cpp
+++ b/Libraries/LibHTTP/HttpsJob.cpp
@@ -43,7 +43,7 @@ void HttpsJob::start()
m_socket->set_root_certificates(m_override_ca_certificates ? *m_override_ca_certificates : DefaultRootCACertificates::the().certificates());
m_socket->on_tls_connected = [this] {
#ifdef HTTPSJOB_DEBUG
- dbg() << "HttpsJob: on_connected callback";
+ dbgln("HttpsJob: on_connected callback");
#endif
on_socket_connected();
};
@@ -90,7 +90,7 @@ void HttpsJob::shutdown()
void HttpsJob::set_certificate(String certificate, String private_key)
{
if (!m_socket->add_client_key(certificate.bytes(), private_key.bytes())) {
- dbg() << "LibHTTP: Failed to set a client certificate";
+ dbgln("LibHTTP: Failed to set a client certificate");
// FIXME: Do something about this failure
ASSERT_NOT_REACHED();
}
diff --git a/Libraries/LibHTTP/Job.cpp b/Libraries/LibHTTP/Job.cpp
index aa0672b259..af3f53c19b 100644
--- a/Libraries/LibHTTP/Job.cpp
+++ b/Libraries/LibHTTP/Job.cpp
@@ -43,16 +43,16 @@ static ByteBuffer handle_content_encoding(const ByteBuffer& buf, const String& c
if (content_encoding == "gzip") {
if (!Core::Gzip::is_compressed(buf)) {
- dbg() << "Job::handle_content_encoding: buf is not gzip compressed!";
+ dbgln("Job::handle_content_encoding: buf is not gzip compressed!");
}
#ifdef JOB_DEBUG
- dbg() << "Job::handle_content_encoding: buf is gzip compressed!";
+ dbgln("Job::handle_content_encoding: buf is gzip compressed!");
#endif
auto uncompressed = Core::Gzip::decompress(buf);
if (!uncompressed.has_value()) {
- dbg() << "Job::handle_content_encoding: Gzip::decompress() failed. Returning original buffer.";
+ dbgln("Job::handle_content_encoding: Gzip::decompress() failed. Returning original buffer.");
return buf;
}
@@ -115,7 +115,7 @@ void Job::on_socket_connected()
m_sent_data = true;
auto raw_request = m_request.to_raw_request();
#ifdef JOB_DEBUG
- dbg() << "Job: raw_request:";
+ dbgln("Job: raw_request:");
dbg() << String::copy(raw_request).characters();
#endif
bool success = write(raw_request);
@@ -234,7 +234,7 @@ void Job::on_socket_connected()
dbg() << "Job: Received a chunk with size _" << size_data << "_";
#endif
if (size_lines.size() == 0) {
- dbg() << "Job: Reached end of stream";
+ dbgln("Job: Reached end of stream");
finish_up();
return IterationDecision::Break;
} else {
@@ -355,7 +355,7 @@ void Job::on_socket_connected()
if (!is_established()) {
#ifdef JOB_DEBUG
- dbg() << "Connection appears to have closed, finishing up";
+ dbgln("Connection appears to have closed, finishing up");
#endif
finish_up();
}
diff --git a/Libraries/LibImageDecoderClient/Client.cpp b/Libraries/LibImageDecoderClient/Client.cpp
index 04fc6135db..cd5fa7243d 100644
--- a/Libraries/LibImageDecoderClient/Client.cpp
+++ b/Libraries/LibImageDecoderClient/Client.cpp
@@ -53,7 +53,7 @@ RefPtr<Gfx::Bitmap> Client::decode_image(const ByteBuffer& encoded_data)
auto encoded_buffer = SharedBuffer::create_with_size(encoded_data.size());
if (!encoded_buffer) {
- dbg() << "Could not allocate encoded shbuf";
+ dbgln("Could not allocate encoded shbuf");
return nullptr;
}
@@ -66,13 +66,13 @@ RefPtr<Gfx::Bitmap> Client::decode_image(const ByteBuffer& encoded_data)
auto bitmap_format = (Gfx::BitmapFormat)response->bitmap_format();
if (bitmap_format == Gfx::BitmapFormat::Invalid) {
#ifdef IMAGE_DECODER_CLIENT_DEBUG
- dbg() << "Response image was invalid";
+ dbgln("Response image was invalid");
#endif
return nullptr;
}
if (response->size().is_empty()) {
- dbg() << "Response image was empty";
+ dbgln("Response image was empty");
return nullptr;
}
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp
index 781fce17a0..8631db1586 100644
--- a/Libraries/LibLine/Editor.cpp
+++ b/Libraries/LibLine/Editor.cpp
@@ -1548,7 +1548,7 @@ Vector<size_t, 2> Editor::vt_dsr()
if (nread == 0) {
m_input_error = Error::Empty;
finish();
- dbg() << "Terminal DSR issue; received no response";
+ dbgln("Terminal DSR issue; received no response");
return { 1, 1 };
}
length += nread;
@@ -1559,13 +1559,13 @@ Vector<size_t, 2> Editor::vt_dsr()
auto parts = StringView(buf + 2, length - 3).split_view(';');
auto row_opt = parts[0].to_int();
if (!row_opt.has_value()) {
- dbg() << "Terminal DSR issue; received garbage row";
+ dbgln("Terminal DSR issue; received garbage row");
} else {
row = row_opt.value();
}
auto col_opt = parts[1].to_int();
if (!col_opt.has_value()) {
- dbg() << "Terminal DSR issue; received garbage col";
+ dbgln("Terminal DSR issue; received garbage col");
} else {
col = col_opt.value();
}
diff --git a/Libraries/LibMarkdown/Text.cpp b/Libraries/LibMarkdown/Text.cpp
index 75273e3a8f..ddb0ea2d81 100644
--- a/Libraries/LibMarkdown/Text.cpp
+++ b/Libraries/LibMarkdown/Text.cpp
@@ -245,14 +245,14 @@ Optional<Text> Text::parse(const StringView& str)
case '[':
#ifdef DEBUG_MARKDOWN
if (first_span_in_the_current_link != -1)
- dbg() << "Dropping the outer link";
+ dbgln("Dropping the outer link");
#endif
first_span_in_the_current_link = spans.size();
break;
case ']': {
if (first_span_in_the_current_link == -1) {
#ifdef DEBUG_MARKDOWN
- dbg() << "Unmatched ]";
+ dbgln("Unmatched ]");
#endif
continue;
}
diff --git a/Libraries/LibProtocol/Download.cpp b/Libraries/LibProtocol/Download.cpp
index 3c226694d8..07f5e76fff 100644
--- a/Libraries/LibProtocol/Download.cpp
+++ b/Libraries/LibProtocol/Download.cpp
@@ -135,7 +135,7 @@ void Download::did_request_certificates(Badge<Client>)
if (on_certificate_requested) {
auto result = on_certificate_requested();
if (!m_client->set_certificate({}, *this, result.certificate, result.key)) {
- dbg() << "Download: set_certificate failed";
+ dbgln("Download: set_certificate failed");
}
}
}
diff --git a/Libraries/LibRegex/RegexMatcher.cpp b/Libraries/LibRegex/RegexMatcher.cpp
index c5d618d7be..fd2f7dab75 100644
--- a/Libraries/LibRegex/RegexMatcher.cpp
+++ b/Libraries/LibRegex/RegexMatcher.cpp
@@ -310,7 +310,7 @@ Optional<bool> Matcher<Parser>::execute(const MatchInput& input, MatchState& sta
auto* opcode = bytecode.get_opcode(state);
if (!opcode) {
- dbg() << "Wrong opcode... failed!";
+ dbgln("Wrong opcode... failed!");
return {};
}
diff --git a/Libraries/LibRegex/Tests/Regex.cpp b/Libraries/LibRegex/Tests/Regex.cpp
index 0bb2e8d2ef..fc920140d0 100644
--- a/Libraries/LibRegex/Tests/Regex.cpp
+++ b/Libraries/LibRegex/Tests/Regex.cpp
@@ -507,12 +507,12 @@ TEST_CASE(ECMA262_parse)
Regex<ECMA262> re(test.pattern);
EXPECT_EQ(re.parser_result.error, test.expected_error);
#ifdef REGEX_DEBUG
- dbg() << "\n";
+ dbgln("\n");
RegexDebug regex_dbg(stderr);
regex_dbg.print_raw_bytecode(re);
regex_dbg.print_header();
regex_dbg.print_bytecode(re);
- dbg() << "\n";
+ dbgln("\n");
#endif
}
}
@@ -552,12 +552,12 @@ TEST_CASE(ECMA262_match)
for (auto& test : tests) {
Regex<ECMA262> re(test.pattern, test.options);
#ifdef REGEX_DEBUG
- dbg() << "\n";
+ dbgln("\n");
RegexDebug regex_dbg(stderr);
regex_dbg.print_raw_bytecode(re);
regex_dbg.print_header();
regex_dbg.print_bytecode(re);
- dbg() << "\n";
+ dbgln("\n");
#endif
EXPECT_EQ(re.parser_result.error, Error::NoError);
EXPECT_EQ(re.match(test.subject).success, test.matches);
@@ -585,12 +585,12 @@ TEST_CASE(replace)
for (auto& test : tests) {
Regex<ECMA262> re(test.pattern, test.options);
#ifdef REGEX_DEBUG
- dbg() << "\n";
+ dbgln("\n");
RegexDebug regex_dbg(stderr);
regex_dbg.print_raw_bytecode(re);
regex_dbg.print_header();
regex_dbg.print_bytecode(re);
- dbg() << "\n";
+ dbgln("\n");
#endif
EXPECT_EQ(re.parser_result.error, Error::NoError);
EXPECT_EQ(re.replace(test.subject, test.replacement), test.expected);
diff --git a/Libraries/LibTLS/ClientHandshake.cpp b/Libraries/LibTLS/ClientHandshake.cpp
index fecda66d17..1632bf6a76 100644
--- a/Libraries/LibTLS/ClientHandshake.cpp
+++ b/Libraries/LibTLS/ClientHandshake.cpp
@@ -51,14 +51,14 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
{
write_packets = WritePacketStage::Initial;
if (m_context.connection_status != ConnectionStatus::Disconnected && m_context.connection_status != ConnectionStatus::Renegotiating) {
- dbg() << "unexpected hello message";
+ dbgln("unexpected hello message");
return (i8)Error::UnexpectedMessage;
}
ssize_t res = 0;
size_t min_hello_size = 41;
if (min_hello_size > buffer.size()) {
- dbg() << "need more data";
+ dbgln("need more data");
return (i8)Error::NeedMoreData;
}
size_t following_bytes = buffer[0] * 0x10000 + buffer[1] * 0x100 + buffer[2];
@@ -69,7 +69,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
}
if (buffer.size() - res < 2) {
- dbg() << "not enough data for version";
+ dbgln("not enough data for version");
return (i8)Error::NeedMoreData;
}
auto version = (Version)AK::convert_between_host_and_network_endian(*(const u16*)buffer.offset_pointer(res));
@@ -83,7 +83,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
u8 session_length = buffer[res++];
if (buffer.size() - res < session_length) {
- dbg() << "not enough data for session id";
+ dbgln("not enough data for session id");
return (i8)Error::NeedMoreData;
}
@@ -91,7 +91,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
memcpy(m_context.session_id, buffer.offset_pointer(res), session_length);
m_context.session_id_size = session_length;
#ifdef TLS_DEBUG
- dbg() << "Remote session ID:";
+ dbgln("Remote session ID:");
print_buffer(ReadonlyBytes { m_context.session_id, session_length });
#endif
} else {
@@ -100,14 +100,14 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
res += session_length;
if (buffer.size() - res < 2) {
- dbg() << "not enough data for cipher suite listing";
+ dbgln("not enough data for cipher suite listing");
return (i8)Error::NeedMoreData;
}
auto cipher = (CipherSuite)AK::convert_between_host_and_network_endian(*(const u16*)buffer.offset_pointer(res));
res += 2;
if (!supports_cipher(cipher)) {
m_context.cipher = CipherSuite::Invalid;
- dbg() << "No supported cipher could be agreed upon";
+ dbgln("No supported cipher could be agreed upon");
return (i8)Error::NoCommonCipher;
}
m_context.cipher = cipher;
@@ -119,12 +119,12 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
m_context.handshake_hash.initialize(Crypto::Hash::HashKind::SHA256);
if (buffer.size() - res < 1) {
- dbg() << "not enough data for compression spec";
+ dbgln("not enough data for compression spec");
return (i8)Error::NeedMoreData;
}
u8 compression = buffer[res++];
if (compression != 0) {
- dbg() << "Server told us to compress, we will not!";
+ dbgln("Server told us to compress, we will not!");
return (i8)Error::CompressionNotSupported;
}
@@ -132,7 +132,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
if (m_context.connection_status != ConnectionStatus::Renegotiating)
m_context.connection_status = ConnectionStatus::Negotiating;
if (m_context.is_server) {
- dbg() << "unsupported: server mode";
+ dbgln("unsupported: server mode");
write_packets = WritePacketStage::ServerHandshake;
}
}
@@ -152,7 +152,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
#endif
if (extension_length) {
if (buffer.size() - res < extension_length) {
- dbg() << "not enough data for extension";
+ dbgln("not enough data for extension");
return (i8)Error::NeedMoreData;
}
@@ -191,7 +191,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
}
}
} else if (extension_type == HandshakeExtension::SignatureAlgorithms) {
- dbg() << "supported signatures: ";
+ dbgln("supported signatures: ");
print_buffer(buffer.slice(res, extension_length));
// FIXME: what are we supposed to do here?
}
@@ -205,7 +205,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
ssize_t TLSv12::handle_finished(ReadonlyBytes buffer, WritePacketStage& write_packets)
{
if (m_context.connection_status < ConnectionStatus::KeyExchange || m_context.connection_status == ConnectionStatus::Established) {
- dbg() << "unexpected finished message";
+ dbgln("unexpected finished message");
return (i8)Error::UnexpectedMessage;
}
@@ -235,7 +235,7 @@ ssize_t TLSv12::handle_finished(ReadonlyBytes buffer, WritePacketStage& write_pa
// TODO: Compare Hashes
#ifdef TLS_DEBUG
- dbg() << "FIXME: handle_finished :: Check message validity";
+ dbgln("FIXME: handle_finished :: Check message validity");
#endif
m_context.connection_status = ConnectionStatus::Established;
@@ -266,7 +266,7 @@ void TLSv12::build_random(PacketBuilder& builder)
}
if (m_context.is_server) {
- dbg() << "Server mode not supported";
+ dbgln("Server mode not supported");
return;
} else {
*(u16*)random_bytes = AK::convert_between_host_and_network_endian((u16)Version::V12);
@@ -276,14 +276,14 @@ void TLSv12::build_random(PacketBuilder& builder)
const auto& certificate_option = verify_chain_and_get_matching_certificate(m_context.SNI); // if the SNI is empty, we'll make a special case and match *a* leaf certificate.
if (!certificate_option.has_value()) {
- dbg() << "certificate verification failed :(";
+ dbgln("certificate verification failed :(");
alert(AlertLevel::Critical, AlertDescription::BadCertificate);
return;
}
auto& certificate = m_context.certificates[certificate_option.value()];
#ifdef TLS_DEBUG
- dbg() << "PreMaster secret";
+ dbgln("PreMaster secret");
print_buffer(m_context.premaster_key);
#endif
@@ -294,12 +294,12 @@ void TLSv12::build_random(PacketBuilder& builder)
rsa.encrypt(m_context.premaster_key, outbuf);
#ifdef TLS_DEBUG
- dbg() << "Encrypted: ";
+ dbgln("Encrypted: ");
print_buffer(outbuf);
#endif
if (!compute_master_secret(bytes)) {
- dbg() << "oh noes we could not derive a master key :(";
+ dbgln("oh noes we could not derive a master key :(");
return;
}
@@ -312,7 +312,7 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
{
if (m_context.connection_status == ConnectionStatus::Established) {
#ifdef TLS_DEBUG
- dbg() << "Renegotiation attempt ignored";
+ dbgln("Renegotiation attempt ignored");
#endif
// FIXME: We should properly say "NoRenegotiation", but that causes a handshake failure
// so we just roll with it and pretend that we _did_ renegotiate
@@ -339,12 +339,12 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
switch (type) {
case HelloRequest:
if (m_context.handshake_messages[0] >= 1) {
- dbg() << "unexpected hello request message";
+ dbgln("unexpected hello request message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[0];
- dbg() << "hello request (renegotiation?)";
+ dbgln("hello request (renegotiation?)");
if (m_context.connection_status == ConnectionStatus::Established) {
// renegotiation
payload_res = (i8)Error::NoRenegotiation;
@@ -362,38 +362,38 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case ServerHello:
if (m_context.handshake_messages[2] >= 1) {
- dbg() << "unexpected server hello message";
+ dbgln("unexpected server hello message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[2];
#ifdef TLS_DEBUG
- dbg() << "server hello";
+ dbgln("server hello");
#endif
if (m_context.is_server) {
- dbg() << "unsupported: server mode";
+ dbgln("unsupported: server mode");
ASSERT_NOT_REACHED();
} else {
payload_res = handle_hello(buffer.slice(1, payload_size), write_packets);
}
break;
case HelloVerifyRequest:
- dbg() << "unsupported: DTLS";
+ dbgln("unsupported: DTLS");
payload_res = (i8)Error::UnexpectedMessage;
break;
case CertificateMessage:
if (m_context.handshake_messages[4] >= 1) {
- dbg() << "unexpected certificate message";
+ dbgln("unexpected certificate message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[4];
#ifdef TLS_DEBUG
- dbg() << "certificate";
+ dbgln("certificate");
#endif
if (m_context.connection_status == ConnectionStatus::Negotiating) {
if (m_context.is_server) {
- dbg() << "unsupported: server mode";
+ dbgln("unsupported: server mode");
ASSERT_NOT_REACHED();
}
payload_res = handle_certificate(buffer.slice(1, payload_size));
@@ -402,7 +402,7 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
if (it.is_end()) {
// no valid certificates
- dbg() << "No valid certificates found";
+ dbgln("No valid certificates found");
payload_res = (i8)Error::BadCertificate;
m_context.critical_error = payload_res;
break;
@@ -418,16 +418,16 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case ServerKeyExchange:
if (m_context.handshake_messages[5] >= 1) {
- dbg() << "unexpected server key exchange message";
+ dbgln("unexpected server key exchange message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[5];
#ifdef TLS_DEBUG
- dbg() << "server key exchange";
+ dbgln("server key exchange");
#endif
if (m_context.is_server) {
- dbg() << "unsupported: server mode";
+ dbgln("unsupported: server mode");
ASSERT_NOT_REACHED();
} else {
payload_res = handle_server_key_exchange(buffer.slice(1, payload_size));
@@ -435,18 +435,18 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case CertificateRequest:
if (m_context.handshake_messages[6] >= 1) {
- dbg() << "unexpected certificate request message";
+ dbgln("unexpected certificate request message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[6];
if (m_context.is_server) {
- dbg() << "invalid request";
- dbg() << "unsupported: server mode";
+ dbgln("invalid request");
+ dbgln("unsupported: server mode");
ASSERT_NOT_REACHED();
} else {
// we do not support "certificate request"
- dbg() << "certificate request";
+ dbgln("certificate request");
if (on_tls_certificate_request)
on_tls_certificate_request(*this);
m_context.client_verified = VerificationNeeded;
@@ -454,16 +454,16 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case ServerHelloDone:
if (m_context.handshake_messages[7] >= 1) {
- dbg() << "unexpected server hello done message";
+ dbgln("unexpected server hello done message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[7];
#ifdef TLS_DEBUG
- dbg() << "server hello done";
+ dbgln("server hello done");
#endif
if (m_context.is_server) {
- dbg() << "unsupported: server mode";
+ dbgln("unsupported: server mode");
ASSERT_NOT_REACHED();
} else {
payload_res = handle_server_hello_done(buffer.slice(1, payload_size));
@@ -473,13 +473,13 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case CertificateVerify:
if (m_context.handshake_messages[8] >= 1) {
- dbg() << "unexpected certificate verify message";
+ dbgln("unexpected certificate verify message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[8];
#ifdef TLS_DEBUG
- dbg() << "certificate verify";
+ dbgln("certificate verify");
#endif
if (m_context.connection_status == ConnectionStatus::KeyExchange) {
payload_res = handle_verify(buffer.slice(1, payload_size));
@@ -489,16 +489,16 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case ClientKeyExchange:
if (m_context.handshake_messages[9] >= 1) {
- dbg() << "unexpected client key exchange message";
+ dbgln("unexpected client key exchange message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[9];
#ifdef TLS_DEBUG
- dbg() << "client key exchange";
+ dbgln("client key exchange");
#endif
if (m_context.is_server) {
- dbg() << "unsupported: server mode";
+ dbgln("unsupported: server mode");
ASSERT_NOT_REACHED();
} else {
payload_res = (i8)Error::UnexpectedMessage;
@@ -509,13 +509,13 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
m_context.cached_handshake.clear();
}
if (m_context.handshake_messages[10] >= 1) {
- dbg() << "unexpected finished message";
+ dbgln("unexpected finished message");
payload_res = (i8)Error::UnexpectedMessage;
break;
}
++m_context.handshake_messages[10];
#ifdef TLS_DEBUG
- dbg() << "finished";
+ dbgln("finished");
#endif
payload_res = handle_finished(buffer.slice(1, payload_size), write_packets);
if (payload_res > 0) {
@@ -602,7 +602,7 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
case WritePacketStage::ClientHandshake:
if (m_context.client_verified == VerificationNeeded) {
#ifdef TLS_DEBUG
- dbg() << "> Client Certificate";
+ dbgln("> Client Certificate");
#endif
auto packet = build_certificate();
write_packet(packet);
@@ -610,14 +610,14 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
}
{
#ifdef TLS_DEBUG
- dbg() << "> Key exchange";
+ dbgln("> Key exchange");
#endif
auto packet = build_client_key_exchange();
write_packet(packet);
}
{
#ifdef TLS_DEBUG
- dbg() << "> change cipher spec";
+ dbgln("> change cipher spec");
#endif
auto packet = build_change_cipher_spec();
write_packet(packet);
@@ -626,7 +626,7 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
m_context.local_sequence_number = 0;
{
#ifdef TLS_DEBUG
- dbg() << "> client finished";
+ dbgln("> client finished");
#endif
auto packet = build_finished();
write_packet(packet);
@@ -635,21 +635,21 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
break;
case WritePacketStage::ServerHandshake:
// server handshake
- dbg() << "UNSUPPORTED: Server mode";
+ dbgln("UNSUPPORTED: Server mode");
ASSERT_NOT_REACHED();
break;
case WritePacketStage::Finished:
// finished
{
#ifdef TLS_DEBUG
- dbg() << "> change cipher spec";
+ dbgln("> change cipher spec");
#endif
auto packet = build_change_cipher_spec();
write_packet(packet);
}
{
#ifdef TLS_DEBUG
- dbg() << "> client finished";
+ dbgln("> client finished");
#endif
auto packet = build_finished();
write_packet(packet);
diff --git a/Libraries/LibTLS/Exchange.cpp b/Libraries/LibTLS/Exchange.cpp
index 391f2d0abd..0765bc5e9d 100644
--- a/Libraries/LibTLS/Exchange.cpp
+++ b/Libraries/LibTLS/Exchange.cpp
@@ -38,7 +38,7 @@ bool TLSv12::expand_key()
auto is_aead = this->is_aead();
if (m_context.master_key.size() == 0) {
- dbg() << "expand_key() with empty master key";
+ dbgln("expand_key() with empty master key");
return false;
}
@@ -73,18 +73,18 @@ bool TLSv12::expand_key()
offset += iv_size;
#ifdef TLS_DEBUG
- dbg() << "client key";
+ dbgln("client key");
print_buffer(client_key, key_size);
- dbg() << "server key";
+ dbgln("server key");
print_buffer(server_key, key_size);
- dbg() << "client iv";
+ dbgln("client iv");
print_buffer(client_iv, iv_size);
- dbg() << "server iv";
+ dbgln("server iv");
print_buffer(server_iv, iv_size);
if (!is_aead) {
- dbg() << "client mac key";
+ dbgln("client mac key");
print_buffer(m_context.crypto.local_mac, mac_size);
- dbg() << "server mac key";
+ dbgln("server mac key");
print_buffer(m_context.crypto.remote_mac, mac_size);
}
#endif
@@ -111,7 +111,7 @@ bool TLSv12::expand_key()
void TLSv12::pseudorandom_function(Bytes output, ReadonlyBytes secret, const u8* label, size_t label_length, ReadonlyBytes seed, ReadonlyBytes seed_b)
{
if (!secret.size()) {
- dbg() << "null secret";
+ dbgln("null secret");
return;
}
@@ -155,7 +155,7 @@ void TLSv12::pseudorandom_function(Bytes output, ReadonlyBytes secret, const u8*
bool TLSv12::compute_master_secret(size_t length)
{
if (m_context.premaster_key.size() == 0 || length < 48) {
- dbg() << "there's no way I can make a master secret like this";
+ dbgln("there's no way I can make a master secret like this");
dbg() << "I'd like to talk to your manager about this length of " << length;
return false;
}
@@ -172,7 +172,7 @@ bool TLSv12::compute_master_secret(size_t length)
m_context.premaster_key.clear();
#ifdef TLS_DEBUG
- dbg() << "master key:";
+ dbgln("master key:");
print_buffer(m_context.master_key);
#endif
expand_key();
@@ -187,7 +187,7 @@ ByteBuffer TLSv12::build_certificate()
Vector<Certificate>* local_certificates = nullptr;
if (m_context.is_server) {
- dbg() << "Unsupported: Server mode";
+ dbgln("Unsupported: Server mode");
ASSERT_NOT_REACHED();
} else {
local_certificates = &m_context.client_certificates;
@@ -214,7 +214,7 @@ ByteBuffer TLSv12::build_certificate()
if (!total_certificate_size) {
#ifdef TLS_DEBUG
- dbg() << "No certificates, sending empty certificate message";
+ dbgln("No certificates, sending empty certificate message");
#endif
builder.append_u24(certificate_vector_header_size);
builder.append_u24(total_certificate_size);
@@ -246,7 +246,7 @@ ByteBuffer TLSv12::build_change_cipher_spec()
ByteBuffer TLSv12::build_server_key_exchange()
{
- dbg() << "FIXME: build_server_key_exchange";
+ dbgln("FIXME: build_server_key_exchange");
return {};
}
@@ -267,13 +267,13 @@ ByteBuffer TLSv12::build_client_key_exchange()
ssize_t TLSv12::handle_server_key_exchange(ReadonlyBytes)
{
- dbg() << "FIXME: parse_server_key_exchange";
+ dbgln("FIXME: parse_server_key_exchange");
return 0;
}
ssize_t TLSv12::handle_verify(ReadonlyBytes)
{
- dbg() << "FIXME: parse_verify";
+ dbgln("FIXME: parse_verify");
return 0;
}
diff --git a/Libraries/LibTLS/Record.cpp b/Libraries/LibTLS/Record.cpp
index 913b7ab81c..1f2e875926 100644
--- a/Libraries/LibTLS/Record.cpp
+++ b/Libraries/LibTLS/Record.cpp
@@ -205,12 +205,12 @@ ByteBuffer TLSv12::hmac_message(const ReadonlyBytes& buf, const Optional<Readonl
ensure_hmac(mac_length, local);
auto& hmac = local ? *m_hmac_local : *m_hmac_remote;
#ifdef TLS_DEBUG
- dbg() << "========================= PACKET DATA ==========================";
+ dbgln("========================= PACKET DATA ==========================");
print_buffer((const u8*)&sequence_number, sizeof(u64));
print_buffer(buf.data(), buf.size());
if (buf2.has_value())
print_buffer(buf2.value().data(), buf2.value().size());
- dbg() << "========================= PACKET DATA ==========================";
+ dbgln("========================= PACKET DATA ==========================");
#endif
hmac.update((const u8*)&sequence_number, sizeof(u64));
hmac.update(buf);
@@ -271,7 +271,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
if (m_context.cipher_spec_set && type != MessageType::ChangeCipher) {
#ifdef TLS_DEBUG
- dbg() << "Encrypted: ";
+ dbgln("Encrypted: ");
print_buffer(buffer.slice(header_size, length));
#endif
@@ -279,7 +279,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
ASSERT(m_aes_remote.gcm);
if (length < 24) {
- dbg() << "Invalid packet length";
+ dbgln("Invalid packet length");
auto packet = build_alert(true, (u8)AlertDescription::DecryptError);
write_packet(packet);
return (i8)Error::BrokenPacket;
@@ -352,13 +352,13 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
length = decrypted_span.size();
#ifdef TLS_DEBUG
- dbg() << "Decrypted: ";
+ dbgln("Decrypted: ");
print_buffer(decrypted);
#endif
auto mac_size = mac_length();
if (length < mac_size) {
- dbg() << "broken packet";
+ dbgln("broken packet");
auto packet = build_alert(true, (u8)AlertDescription::DecryptError);
write_packet(packet);
return (i8)Error::BrokenPacket;
@@ -374,9 +374,9 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
auto message_mac = ReadonlyBytes { message_hmac, mac_size };
if (hmac != message_mac) {
dbg() << "integrity check failed (mac length " << mac_size << ")";
- dbg() << "mac received:";
+ dbgln("mac received:");
print_buffer(message_mac);
- dbg() << "mac computed:";
+ dbgln("mac computed:");
print_buffer(hmac);
auto packet = build_alert(true, (u8)AlertDescription::BadRecordMAC);
write_packet(packet);
@@ -391,7 +391,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
switch (type) {
case MessageType::ApplicationData:
if (m_context.connection_status != ConnectionStatus::Established) {
- dbg() << "unexpected application data";
+ dbgln("unexpected application data");
payload_res = (i8)Error::UnexpectedMessage;
auto packet = build_alert(true, (u8)AlertDescription::UnexpectedMessage);
write_packet(packet);
@@ -405,18 +405,18 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
break;
case MessageType::Handshake:
#ifdef TLS_DEBUG
- dbg() << "tls handshake message";
+ dbgln("tls handshake message");
#endif
payload_res = handle_payload(plain);
break;
case MessageType::ChangeCipher:
if (m_context.connection_status != ConnectionStatus::KeyExchange) {
- dbg() << "unexpected change cipher message";
+ dbgln("unexpected change cipher message");
auto packet = build_alert(true, (u8)AlertDescription::UnexpectedMessage);
payload_res = (i8)Error::UnexpectedMessage;
} else {
#ifdef TLS_DEBUG
- dbg() << "change cipher spec message";
+ dbgln("change cipher spec message");
#endif
m_context.cipher_spec_set = true;
m_context.remote_sequence_number = 0;
@@ -447,7 +447,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
m_context.connection_finished = true;
if (!m_context.cipher_spec_set) {
// AWS CloudFront hits this.
- dbg() << "Server sent a close notify and we haven't agreed on a cipher suite. Treating it as a handshake failure.";
+ dbgln("Server sent a close notify and we haven't agreed on a cipher suite. Treating it as a handshake failure.");
m_context.critical_error = (u8)AlertDescription::HandshakeFailure;
try_disambiguate_error();
}
@@ -456,7 +456,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
}
break;
default:
- dbg() << "message not understood";
+ dbgln("message not understood");
return (i8)Error::NotUnderstood;
}
diff --git a/Libraries/LibTLS/Socket.cpp b/Libraries/LibTLS/Socket.cpp
index 79572582a0..fd7c97761f 100644
--- a/Libraries/LibTLS/Socket.cpp
+++ b/Libraries/LibTLS/Socket.cpp
@@ -77,7 +77,7 @@ bool TLSv12::write(ReadonlyBytes buffer)
{
if (m_context.connection_status != ConnectionStatus::Established) {
#ifdef TLS_DEBUG
- dbg() << "write request while not connected";
+ dbgln("write request while not connected");
#endif
return false;
}
@@ -194,7 +194,7 @@ bool TLSv12::check_connection_state(bool read)
if (!Core::Socket::is_open() || !Core::Socket::is_connected() || Core::Socket::eof()) {
// an abrupt closure (the server is a jerk)
#ifdef TLS_DEBUG
- dbg() << "Socket not open, assuming abrupt closure";
+ dbgln("Socket not open, assuming abrupt closure");
#endif
m_context.connection_finished = true;
}
@@ -218,7 +218,7 @@ bool TLSv12::check_connection_state(bool read)
} else {
m_context.connection_finished = false;
#ifdef TLS_DEBUG
- dbg() << "FINISHED";
+ dbgln("FINISHED");
#endif
}
if (!m_context.application_buffer.size()) {
@@ -239,7 +239,7 @@ bool TLSv12::flush()
return true;
#ifdef TLS_DEBUG
- dbg() << "SENDING...";
+ dbgln("SENDING...");
print_buffer(out_buffer, out_buffer_length);
#endif
if (Core::Socket::write(&out_buffer[out_buffer_index], out_buffer_length)) {
diff --git a/Libraries/LibTLS/TLSv12.cpp b/Libraries/LibTLS/TLSv12.cpp
index 4a0fe20440..272f12b961 100644
--- a/Libraries/LibTLS/TLSv12.cpp
+++ b/Libraries/LibTLS/TLSv12.cpp
@@ -96,7 +96,7 @@ static bool _set_algorithm(CertificateKeyAlgorithm& algorithm, const u8* value,
{
if (length == 7) {
// Elliptic Curve pubkey
- dbg() << "Cert.algorithm: EC, unsupported";
+ dbgln("Cert.algorithm: EC, unsupported");
return false;
}
@@ -113,7 +113,7 @@ static bool _set_algorithm(CertificateKeyAlgorithm& algorithm, const u8* value,
}
if (length != 9) {
- dbg() << "Invalid certificate algorithm";
+ dbgln("Invalid certificate algorithm");
return false;
}
@@ -193,7 +193,7 @@ static ssize_t _parse_asn1(const Context& context, Certificate& cert, const u8*
while (position < size) {
size_t start_position = position;
if (size - position < 2) {
- dbg() << "not enough data for certificate size";
+ dbgln("not enough data for certificate size");
return (i8)Error::NeedMoreData;
}
u8 first = buffer[position++];
@@ -210,7 +210,7 @@ static ssize_t _parse_asn1(const Context& context, Certificate& cert, const u8*
if (octets > 4 || octets > size - position) {
#ifdef TLS_DEBUG
- dbg() << "could not read the certificate";
+ dbgln("could not read the certificate");
#endif
return position;
}
@@ -218,7 +218,7 @@ static ssize_t _parse_asn1(const Context& context, Certificate& cert, const u8*
position += octets;
if (size - position < length) {
#ifdef TLS_DEBUG
- dbg() << "not enough data for sequence";
+ dbgln("not enough data for sequence");
#endif
return (i8)Error::NeedMoreData;
}
@@ -420,7 +420,7 @@ static ssize_t _parse_asn1(const Context& context, Certificate& cert, const u8*
cert.fingerprint.grow(fingerprint.data_length());
cert.fingerprint.overwrite(0, fingerprint.immutable_data(), fingerprint.data_length());
#ifdef TLS_DEBUG
- dbg() << "Certificate fingerprint:";
+ dbgln("Certificate fingerprint:");
print_buffer(cert.fingerprint);
#endif
}
@@ -453,7 +453,7 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer)
if (buffer.size() < 3) {
#ifdef TLS_DEBUG
- dbg() << "not enough certificate header data";
+ dbgln("not enough certificate header data");
#endif
return (i8)Error::NeedMoreData;
}
@@ -471,7 +471,7 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer)
if (certificate_total_length > buffer.size() - res) {
#ifdef TLS_DEBUG
- dbg() << "not enough data for claimed total cert length";
+ dbgln("not enough data for claimed total cert length");
#endif
return (i8)Error::NeedMoreData;
}
@@ -484,7 +484,7 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer)
++index;
if (buffer.size() - res < 3) {
#ifdef TLS_DEBUG
- dbg() << "not enough data for certificate length";
+ dbgln("not enough data for certificate length");
#endif
return (i8)Error::NeedMoreData;
}
@@ -493,7 +493,7 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer)
if (buffer.size() - res < certificate_size) {
#ifdef TLS_DEBUG
- dbg() << "not enough data for certificate body";
+ dbgln("not enough data for certificate body");
#endif
return (i8)Error::NeedMoreData;
}
@@ -504,7 +504,7 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer)
do {
if (remaining <= 3) {
- dbg() << "Ran out of data";
+ dbgln("Ran out of data");
break;
}
++certificates_in_chain;
@@ -603,7 +603,7 @@ void TLSv12::consume(ReadonlyBytes record)
index += length;
buffer_length -= length;
if (m_context.critical_error) {
- dbg() << "Broken connection";
+ dbgln("Broken connection");
m_context.error_code = Error::BrokenConnection;
break;
}
@@ -674,61 +674,61 @@ bool Certificate::is_valid() const
void TLSv12::try_disambiguate_error() const
{
- dbg() << "Possible failure cause(s): ";
+ dbgln("Possible failure cause(s): ");
switch ((AlertDescription)m_context.critical_error) {
case AlertDescription::HandshakeFailure:
if (!m_context.cipher_spec_set) {
dbg() << "- No cipher suite in common with " << m_context.SNI;
} else {
- dbg() << "- Unknown internal issue";
+ dbgln("- Unknown internal issue");
}
break;
case AlertDescription::InsufficientSecurity:
dbg() << "- No cipher suite in common with " << m_context.SNI << " (the server is oh so secure)";
break;
case AlertDescription::ProtocolVersion:
- dbg() << "- The server refused to negotiate with TLS 1.2 :(";
+ dbgln("- The server refused to negotiate with TLS 1.2 :(");
break;
case AlertDescription::UnexpectedMessage:
- dbg() << "- We sent an invalid message for the state we're in.";
+ dbgln("- We sent an invalid message for the state we're in.");
break;
case AlertDescription::BadRecordMAC:
- dbg() << "- Bad MAC record from our side.";
- dbg() << "- Ciphertext wasn't an even multiple of the block length.";
- dbg() << "- Bad block cipher padding.";
- dbg() << "- If both sides are compliant, the only cause is messages being corrupted in the network.";
+ dbgln("- Bad MAC record from our side.");
+ dbgln("- Ciphertext wasn't an even multiple of the block length.");
+ dbgln("- Bad block cipher padding.");
+ dbgln("- If both sides are compliant, the only cause is messages being corrupted in the network.");
break;
case AlertDescription::RecordOverflow:
- dbg() << "- Sent a ciphertext record which has a length bigger than 18432 bytes.";
- dbg() << "- Sent record decrypted to a compressed record that has a length bigger than 18432 bytes.";
- dbg() << "- If both sides are compliant, the only cause is messages being corrupted in the network.";
+ dbgln("- Sent a ciphertext record which has a length bigger than 18432 bytes.");
+ dbgln("- Sent record decrypted to a compressed record that has a length bigger than 18432 bytes.");
+ dbgln("- If both sides are compliant, the only cause is messages being corrupted in the network.");
break;
case AlertDescription::DecompressionFailure:
- dbg() << "- We sent invalid input for decompression (e.g. data that would expand to excessive length)";
+ dbgln("- We sent invalid input for decompression (e.g. data that would expand to excessive length)");
break;
case AlertDescription::IllegalParameter:
- dbg() << "- We sent a parameter in the handshake that is out of range or inconsistent with the other parameters.";
+ dbgln("- We sent a parameter in the handshake that is out of range or inconsistent with the other parameters.");
break;
case AlertDescription::DecodeError:
- dbg() << "- The message we sent cannot be decoded because a field was out of range or the length was incorrect.";
- dbg() << "- If both sides are compliant, the only cause is messages being corrupted in the network.";
+ dbgln("- The message we sent cannot be decoded because a field was out of range or the length was incorrect.");
+ dbgln("- If both sides are compliant, the only cause is messages being corrupted in the network.");
break;
case AlertDescription::DecryptError:
- dbg() << "- A handshake crypto operation failed. This includes signature verification and validating Finished.";
+ dbgln("- A handshake crypto operation failed. This includes signature verification and validating Finished.");
break;
case AlertDescription::AccessDenied:
- dbg() << "- The certificate is valid, but once access control was applied, the sender decided to stop negotiation.";
+ dbgln("- The certificate is valid, but once access control was applied, the sender decided to stop negotiation.");
break;
case AlertDescription::InternalError:
- dbg() << "- No one knows, but it isn't a protocol failure.";
+ dbgln("- No one knows, but it isn't a protocol failure.");
break;
case AlertDescription::DecryptionFailed:
case AlertDescription::NoCertificate:
case AlertDescription::ExportRestriction:
- dbg() << "- No one knows, the server sent a non-compliant alert.";
+ dbgln("- No one knows, the server sent a non-compliant alert.");
break;
default:
- dbg() << "- No one knows.";
+ dbgln("- No one knows.");
break;
}
}
@@ -736,7 +736,7 @@ void TLSv12::try_disambiguate_error() const
void TLSv12::set_root_certificates(Vector<Certificate> certificates)
{
if (!m_context.root_ceritificates.is_empty())
- dbg() << "TLS warn: resetting root certificates!";
+ dbgln("TLS warn: resetting root certificates!");
for (auto& cert : certificates) {
if (!cert.is_valid())
@@ -750,7 +750,7 @@ bool Context::verify_chain() const
{
const Vector<Certificate>* local_chain = nullptr;
if (is_server) {
- dbg() << "Unsupported: Server mode";
+ dbgln("Unsupported: Server mode");
TODO();
} else {
local_chain = &certificates;
@@ -853,13 +853,13 @@ bool TLSv12::add_client_key(ReadonlyBytes certificate_pem_buffer, ReadonlyBytes
}
auto decoded_certificate = Crypto::decode_pem(certificate_pem_buffer, 0);
if (decoded_certificate.is_empty()) {
- dbg() << "Certificate not PEM";
+ dbgln("Certificate not PEM");
return false;
}
auto maybe_certificate = parse_asn1(decoded_certificate);
if (!maybe_certificate.has_value()) {
- dbg() << "Invalid certificate";
+ dbgln("Invalid certificate");
return false;
}
diff --git a/Libraries/LibTTF/Font.cpp b/Libraries/LibTTF/Font.cpp
index 0e514b7be1..de3ef7a1bf 100644
--- a/Libraries/LibTTF/Font.cpp
+++ b/Libraries/LibTTF/Font.cpp
@@ -204,7 +204,7 @@ RefPtr<Font> Font::load_from_file(const StringView& path, unsigned index)
}
auto file = file_or_error.value();
if (!file->open(Core::IODevice::ReadOnly)) {
- dbg() << "Could not open file";
+ dbgln("Could not open file");
return nullptr;
}
auto buffer = file->read_all();
@@ -214,25 +214,25 @@ RefPtr<Font> Font::load_from_file(const StringView& path, unsigned index)
RefPtr<Font> Font::load_from_memory(ByteBuffer& buffer, unsigned index)
{
if (buffer.size() < 4) {
- dbg() << "Font file too small";
+ dbgln("Font file too small");
return nullptr;
}
u32 tag = be_u32(buffer.data());
if (tag == tag_from_str("ttcf")) {
// It's a font collection
if (buffer.size() < (u32)Sizes::TTCHeaderV1 + sizeof(u32) * (index + 1)) {
- dbg() << "Font file too small";
+ dbgln("Font file too small");
return nullptr;
}
u32 offset = be_u32(buffer.offset_pointer((u32)Sizes::TTCHeaderV1 + sizeof(u32) * index));
return load_from_offset(move(buffer), offset);
}
if (tag == tag_from_str("OTTO")) {
- dbg() << "CFF fonts not supported yet";
+ dbgln("CFF fonts not supported yet");
return nullptr;
}
if (tag != 0x00010000) {
- dbg() << "Not a valid font";
+ dbgln("Not a valid font");
return nullptr;
}
return load_from_offset(move(buffer), 0);
@@ -242,7 +242,7 @@ RefPtr<Font> Font::load_from_memory(ByteBuffer& buffer, unsigned index)
RefPtr<Font> Font::load_from_offset(ByteBuffer&& buffer, u32 offset)
{
if (buffer.size() < offset + (u32)Sizes::OffsetTable) {
- dbg() << "Font file too small";
+ dbgln("Font file too small");
return nullptr;
}
@@ -263,7 +263,7 @@ RefPtr<Font> Font::load_from_offset(ByteBuffer&& buffer, u32 offset)
auto num_tables = be_u16(buffer.offset_pointer(offset + (u32)Offsets::NumTables));
if (buffer.size() < offset + (u32)Sizes::OffsetTable + num_tables * (u32)Sizes::TableRecord) {
- dbg() << "Font file too small";
+ dbgln("Font file too small");
return nullptr;
}
@@ -279,7 +279,7 @@ RefPtr<Font> Font::load_from_offset(ByteBuffer&& buffer, u32 offset)
}
if (buffer.size() < table_offset + table_length) {
- dbg() << "Font file too small";
+ dbgln("Font file too small");
return nullptr;
}
auto buffer_here = ReadonlyBytes(buffer.offset_pointer(table_offset), table_length);
@@ -303,43 +303,43 @@ RefPtr<Font> Font::load_from_offset(ByteBuffer&& buffer, u32 offset)
}
if (!opt_head_slice.has_value() || !(opt_head = Head::from_slice(opt_head_slice.value())).has_value()) {
- dbg() << "Could not load Head";
+ dbgln("Could not load Head");
return nullptr;
}
auto head = opt_head.value();
if (!opt_hhea_slice.has_value() || !(opt_hhea = Hhea::from_slice(opt_hhea_slice.value())).has_value()) {
- dbg() << "Could not load Hhea";
+ dbgln("Could not load Hhea");
return nullptr;
}
auto hhea = opt_hhea.value();
if (!opt_maxp_slice.has_value() || !(opt_maxp = Maxp::from_slice(opt_maxp_slice.value())).has_value()) {
- dbg() << "Could not load Maxp";
+ dbgln("Could not load Maxp");
return nullptr;
}
auto maxp = opt_maxp.value();
if (!opt_hmtx_slice.has_value() || !(opt_hmtx = Hmtx::from_slice(opt_hmtx_slice.value(), maxp.num_glyphs(), hhea.number_of_h_metrics())).has_value()) {
- dbg() << "Could not load Hmtx";
+ dbgln("Could not load Hmtx");
return nullptr;
}
auto hmtx = opt_hmtx.value();
if (!opt_cmap_slice.has_value() || !(opt_cmap = Cmap::from_slice(opt_cmap_slice.value())).has_value()) {
- dbg() << "Could not load Cmap";
+ dbgln("Could not load Cmap");
return nullptr;
}
auto cmap = opt_cmap.value();
if (!opt_loca_slice.has_value() || !(opt_loca = Loca::from_slice(opt_loca_slice.value(), maxp.num_glyphs(), head.index_to_loc_format())).has_value()) {
- dbg() << "Could not load Loca";
+ dbgln("Could not load Loca");
return nullptr;
}
auto loca = opt_loca.value();
if (!opt_glyf_slice.has_value()) {
- dbg() << "Could not load Glyf";
+ dbgln("Could not load Glyf");
return nullptr;
}
auto glyf = Glyf(opt_glyf_slice.value());
diff --git a/Libraries/LibVT/Terminal.cpp b/Libraries/LibVT/Terminal.cpp
index 75263f26b6..ce0ec61d6a 100644
--- a/Libraries/LibVT/Terminal.cpp
+++ b/Libraries/LibVT/Terminal.cpp
@@ -565,7 +565,7 @@ void Terminal::execute_xterm_command()
m_final = '@';
if (numeric_params.is_empty()) {
- dbg() << "Empty Xterm params?";
+ dbgln("Empty Xterm params?");
return;
}
@@ -820,7 +820,7 @@ void Terminal::DSR(const ParamVector& params)
// Cursor position query
emit_string(String::format("\033[%d;%dR", m_cursor_row + 1, m_cursor_column + 1));
} else {
- dbg() << "Unknown DSR";
+ dbgln("Unknown DSR");
}
}
diff --git a/Libraries/LibWeb/CSS/Parser/CSSParser.cpp b/Libraries/LibWeb/CSS/Parser/CSSParser.cpp
index d615f0abc9..62bee3b733 100644
--- a/Libraries/LibWeb/CSS/Parser/CSSParser.cpp
+++ b/Libraries/LibWeb/CSS/Parser/CSSParser.cpp
@@ -41,9 +41,9 @@
ASSERT_NOT_REACHED(); \
}
-#define PARSE_ERROR() \
- do { \
- dbg() << "CSS parse error"; \
+#define PARSE_ERROR() \
+ do { \
+ dbgln("CSS parse error"); \
} while (0)
namespace Web {
diff --git a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
index 45e05776a6..dbedd118b5 100644
--- a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
+++ b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp
@@ -356,14 +356,14 @@ int main(int argc, char** argv)
}
#if 0
- dbg() << "Attributes:";
+ dbgln("Attributes:");
for (auto& attribute : interface->attributes) {
dbg() << " " << (attribute.readonly ? "Readonly " : "")
<< attribute.type.name << (attribute.type.nullable ? "?" : "")
<< " " << attribute.name;
}
- dbg() << "Functions:";
+ dbgln("Functions:");
for (auto& function : interface->functions) {
dbg() << " " << function.return_type.name << (function.return_type.nullable ? "?" : "")
<< " " << function.name;
diff --git a/Libraries/LibWeb/DOM/Node.cpp b/Libraries/LibWeb/DOM/Node.cpp
index f5dcc872ce..6890e4fda5 100644
--- a/Libraries/LibWeb/DOM/Node.cpp
+++ b/Libraries/LibWeb/DOM/Node.cpp
@@ -190,7 +190,7 @@ RefPtr<Node> Node::insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, b
if (!child)
return append_child(move(node), notify);
if (child->parent_node() != this) {
- dbg() << "FIXME: Trying to insert_before() a bogus child";
+ dbgln("FIXME: Trying to insert_before() a bogus child");
return nullptr;
}
if (&node->document() != &document())
diff --git a/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
index 729e78ec57..a043527f5b 100644
--- a/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
+++ b/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
@@ -207,7 +207,7 @@ void CanvasRenderingContext2D::fill(const String& fill_rule)
RefPtr<ImageData> CanvasRenderingContext2D::create_image_data(int width, int height) const
{
if (!wrapper()) {
- dbg() << "Hmm! Attempted to create ImageData for wrapper-less CRC2D.";
+ dbgln("Hmm! Attempted to create ImageData for wrapper-less CRC2D.");
return nullptr;
}
return ImageData::create_with_size(wrapper()->global_object(), width, height);
diff --git a/Libraries/LibWeb/Loader/Resource.cpp b/Libraries/LibWeb/Loader/Resource.cpp
index b063cd11ac..2cb6ebc52d 100644
--- a/Libraries/LibWeb/Loader/Resource.cpp
+++ b/Libraries/LibWeb/Loader/Resource.cpp
@@ -106,7 +106,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap
m_mime_type = url().data_mime_type();
} else {
#ifdef RESOURCE_DEBUG
- dbg() << "No Content-Type header to go on! Guessing based on filename...";
+ dbgln("No Content-Type header to go on! Guessing based on filename...");
#endif
m_encoding = "utf-8"; // FIXME: This doesn't seem nice.
m_mime_type = Core::guess_mime_type_based_on_filename(url().path());
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp
index b9fec926f4..5a3c01fc4c 100644
--- a/Libraries/LibWeb/SVG/SVGPathElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp
@@ -92,7 +92,7 @@ static void print_instruction(const PathInstruction& instruction)
dbg() << " (rx=" << data[i] << ", ry=" << data[i + 1] << ") x-axis-rotation=" << data[i + 2] << ", large-arc-flag=" << data[i + 3] << ", sweep-flag=" << data[i + 4] << ", (x=" << data[i + 5] << ", y=" << data[i + 6] << ")";
break;
case PathInstructionType::Invalid:
- dbg() << "Invalid";
+ dbgln("Invalid");
break;
}
}
diff --git a/Libraries/LibWeb/WebContentClient.cpp b/Libraries/LibWeb/WebContentClient.cpp
index 0c09cb92af..870b691d3b 100644
--- a/Libraries/LibWeb/WebContentClient.cpp
+++ b/Libraries/LibWeb/WebContentClient.cpp
@@ -70,7 +70,7 @@ void WebContentClient::handle(const Messages::WebContentClient::DidInvalidateCon
void WebContentClient::handle(const Messages::WebContentClient::DidChangeSelection&)
{
#ifdef DEBUG_SPAM
- dbg() << "handle: WebContentClient::DidChangeSelection!";
+ dbgln("handle: WebContentClient::DidChangeSelection!");
#endif
m_view.notify_server_did_change_selection({});
}
@@ -110,7 +110,7 @@ void WebContentClient::handle(const Messages::WebContentClient::DidHoverLink& me
void WebContentClient::handle(const Messages::WebContentClient::DidUnhoverLink&)
{
#ifdef DEBUG_SPAM
- dbg() << "handle: WebContentClient::DidUnhoverLink!";
+ dbgln("handle: WebContentClient::DidUnhoverLink!");
#endif
m_view.notify_server_did_unhover_link({});
}