# TRACE a string?

**URL:** <https://forum.sierrawireless.com/t/trace-a-string/792>\
**Category:** Open AT\
**Created:** [October 16, 2006, 2:42pm UTC](https://forum.sierrawireless.com/t/trace-a-string/792 "2006-10-16T14:42:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [October 16, 2006, 2:42pm UTC](https://forum.sierrawireless.com/t/trace-a-string/792/1 "2006-10-16T14:42:04Z")

</div>

> [@The ADL User Guide](#):
>
> … the trace string … may use the standard C “sprintf” syntax.

But if I try, say,

```auto
ascii my_string[] = "Hello, world"

TRACE(( 10, "%s", my_string ));
```

The trace just shows:

> [@](#):
>
> Trace CUS4 10 Trace error : The string and the variadic args are not matching !

Does TRACE support %s ?

---

<div class="post-metadata">

**Author:** ![Ralf\_Ebert](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@Ralf\_Ebert](https://forum.sierrawireless.com/u/Ralf_Ebert)\
**Post date:** [October 17, 2006, 7:14am UTC](https://forum.sierrawireless.com/t/trace-a-string/792/2 "2006-10-17T07:14:51Z")

</div>

No, TRACE don’t support %s — and also TRACE don’t support more then six arguments too ☹

Best Regards  
Ralf

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [October 17, 2006, 10:21am UTC](https://forum.sierrawireless.com/t/trace-a-string/792/3 "2006-10-17T10:21:31Z")

</div>

> [@The ADL User Guide](#):
>
> … the trace string … may use the standard C “sprintf” syntax.

> [@Ralf Ebert](#):
>
> No, TRACE don’t support %s

So the ADL User Guide lies - again! 😠

(the Basic User Guide does specifically list the supported formats - just %c, %x, %u, %d - but there is no indication that this limitation is inherited by the ADL TRACE Macro).

> [@](#):
>
> and also TRACE don’t support more then six arguments too ☹

That one isn’t even mentioned in the Basic User Guide! 😠😠

---

<div class="post-metadata">

**Author:** ![gmnvh](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gmnvh](https://forum.sierrawireless.com/u/gmnvh)\
**Post date:** [October 25, 2006, 4:51pm UTC](https://forum.sierrawireless.com/t/trace-a-string/792/4 "2006-10-25T16:51:12Z")

</div>

You can make it work changing the code like that

```auto
ascii my_string[] = "Hello, world";

TRACE ((1,my_string));
```

Rgds,  
Gus

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [October 25, 2006, 10:06pm UTC](https://forum.sierrawireless.com/t/trace-a-string/792/5 "2006-10-25T22:06:20Z")

</div>

Yes, that’s fine for the trivial case - but you still can’t use %s (as the manual says should be possible) for stuff like

```auto
TRACE(( 1, "Received string = '%s'", my_string ));
```

Instead, you have to mess about with sprintf to a temporary buffer, and then TRACE the temporary buffer.

The really annoying thing here is not the fact that %s doesn’t work, but the fact that the manual doesn’t tell you that it won’t work ☹ - in fact, the manual suggests that it should work! 😠

---

<div class="post-metadata">

**Author:** ![jan](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jan](https://forum.sierrawireless.com/u/jan)\
**Post date:** [October 26, 2006, 7:33am UTC](https://forum.sierrawireless.com/t/trace-a-string/792/6 "2006-10-26T07:33:22Z")

</div>

Hi awneil,

Have you thought about applying for a job at Wavecom? Well, I am not affiliated with Wavecom, so I can’t hire you… But I think they really need someone like you who reads the manuals carefully and discovers the problems they contain. They probably also don’t have the manpower to fix these so you maybe could also help there…

Best Regards,  
Jan

---

<div class="post-metadata">

**Author:** ![erdalb](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@erdalb](https://forum.sierrawireless.com/u/erdalb)\
**Post date:** [October 28, 2006, 7:46pm UTC](https://forum.sierrawireless.com/t/trace-a-string/792/7 "2006-10-28T19:46:09Z")

</div>

Software can have bugs. Manuals are software. Manuals can have bugs.  
I think there is a need for a bug tracking system interface for developers like us.

What can be done:

1- Bugs that are decided on the forum can be submitted to this system as developer bugs.  
2- Feature requests can also be submitted as ‘bugs’. ( can be voted in polls of the forum )  
3- Lets improve the idea when we have more time…
