Skip to content

Commit 144f55b

Browse files
authored
Fix linking error when using concordium_dbg! (#389)
1 parent 1b7f910 commit 144f55b

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

concordium-std/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased changes
44

5+
- Fix a bug that caused a linking error when using `concordium_dbg!`.
6+
- The error message states that `_debug_print` cannot be found.
7+
58
## concordium-std 6.0.0 (2024-01-22)
69

710
- Add a `concordium_dbg!` macro and the associated `debug` feature to enable,

concordium-std/src/prims.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,33 @@ mod host_dummy_functions {
477477
fn hash_keccak_256(_data: *const u8, _data_len: u32, _output: *mut u8) {
478478
unimplemented!("Dummy function! Not to be executed")
479479
}
480+
481+
#[no_mangle]
482+
fn report_error(
483+
_msg_start: *const u8,
484+
_msg_length: u32,
485+
_filename_start: *const u8,
486+
_filename_length: u32,
487+
_line: u32,
488+
_column: u32,
489+
) {
490+
unimplemented!("Dummy function! Not to be executed")
491+
}
492+
493+
#[no_mangle]
494+
fn debug_print(
495+
_msg_start: *const u8,
496+
_msg_length: u32,
497+
_filename_start: *const u8,
498+
_filename_length: u32,
499+
_line: u32,
500+
_column: u32,
501+
) {
502+
unimplemented!("Dummy function! Not to be executed")
503+
}
504+
505+
#[no_mangle]
506+
fn get_random(_dest: *mut u8, _size: u32) {
507+
unimplemented!("Dummy function! Not to be executed")
508+
}
480509
}

0 commit comments

Comments
 (0)