10-17-2004
thanks.
it works now. And it is time for getting familiar with gcc compiling options, I think.
9 More Discussions You Might Find Interesting
1. Programming
Hi!
when i'm trying to compile this lite example
on my linux machine I'll get errors and i don't know why..
#include <stdio.h>
#include <math.h> /* needed by sqrt() */
int main()
{
printf("%f", sqrt(10.0));
return (0);
}
this is the error:
/tmp/cc33hNVHK.o: In function... (1 Reply)
Discussion started by: CreamHarry
1 Replies
2. Shell Programming and Scripting
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies
3. Shell Programming and Scripting
HI,
I have a file which i catenate and using the fields in the file, I would like to get sqrt of it. I tried to man the function but it normally would need an echo as well as bc.
What I am intending to find out is catenate a file where let say
cat a.txt| awk ' {
t= h*($3+$2);
t=... (7 Replies)
Discussion started by: ahjiefreak
7 Replies
4. UNIX for Dummies Questions & Answers
I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem.
so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies
5. Shell Programming and Scripting
hi friends
can any body tell me how can i find sqrt of a any given number without using expr in bash shell
while i am doing i got some errors please take a look
and code is here
x=$((( ( sqrt($1) ) | bc )))
echo $x
$ sh quadratic-eqn-roots.sh 9
quadratic-eqn-roots.sh: line 12: ( (... (6 Replies)
Discussion started by: srinivas2828
6 Replies
6. Programming
This so basic that it should work.... Any ideas would be appreciared. Using a number directly in the sqrt allows it to compile.
primrose > cat a.c
#include <stdio.h>
#include <math.h>
int main(void)
{
double abcd=9;
printf("%f\n",sqrt(abcd));
}
primrose > gcc a.c
Undefined first... (2 Replies)
Discussion started by: plastichead
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
i have a the following script:
#!/bin/bash
a=3
b=9
let "c= b*a"
let "d=sqrt $c "
echo $d
But when i execute the code, it gives me the an error saying:
line 5: let: d=sqrt 27 : syntax error in expression (error token is "27 ")
Can any body tell me what I'm doing wrong? (5 Replies)
Discussion started by: limadario
5 Replies
8. Shell Programming and Scripting
I need assistance with following requirement, I am new to Unix.
I want to do the following task but stuck with file creation date(sysdate)
Following is the requirement
I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies
9. Shell Programming and Scripting
Hi all...
This is just a fun project to see if it is possible to get a square root of a positive integer from 1 to 9200000 to 6 decimal places on a 64 bit architecture machine.
It is coded around dash and the results show the values from 0 to 10000.
Complex numbers can easily be catered for by... (3 Replies)
Discussion started by: wisecracker
3 Replies
LEARN ABOUT CENTOS
error::sdt
ERROR::SDT(7stap) ERROR::SDT(7stap)
NAME
error::sdt - <sys/sdt.h> marker failures
DESCRIPTION
Systemtap's <sys/sdt.h> probes are modeled after the dtrace USDT API, but are implemented differently. They leave a only a NOP instruction
in the userspace program's text segment, and add an ELF note to the binary with metadata. This metadata describes the marker's name and
parameters. This encoding is designed to be parseable by multiple tools (not just systemtap: GDB, the GNU Debugger, also contains sup-
port). These allow the tools to find parameters and their types, wherever they happen to reside, even without DWARF debuginfo.
The reason finding parameters is tricky is because the STAP_PROBE / DTRACE_PROBE markers store an assembly language expression for each op-
erand, as a result of use of gcc inline-assembly directives. The compiler is given a broad gcc operand constraint string ("nor") for the
operands, which usually works well. Usually, it does not force the compiler to load the parameters into or out of registers, which would
slow down an instrumented program. However, some instrumentation sites with some parameters do not work well with the default "nor" con-
straint.
unresolveable at run-time
GCC may emit strings that an assembler could resolve (from the context of compiling the original program), but a run-time tool can-
not. For example, the operand string might refer to a label of a local symbol that is not emitted into the ELF object file at all,
which leaves no trace for the run-time. Reference to such parameters from within systemtap can result in "SDT asm not understood"
errors.
too complicated expression
GCC might synthesize very complicated assembly addressing modes from complex C data types / pointer expressions. systemtap or gdb
may not be able to parse some valid but complicated expressions. Reference to such parameters from within systemtap can result in
"SDT asm not understood" errors.
overly restrictive constraint
GCC might not be able to even compile the original program with the default "nor" constraint due to shortage of registers or other
reasons. A compile-time gcc error such as "asm operand has impossible constraints" may result.
There are two general workarounds to this family of problems.
change the constraints
While compiling the original instrumented program, set the STAP_SDT_ARG_CONSTRAINT macro to different constraint strings. See the
GCC manual about various options. For example, on many machine architectures, "r" forces operands into registers, and "g" leaves
operands essentially unconstrained.
revert to debuginfo
As long as the instrumented program compiles, it may be fine simply to keep using <sys/sdt.h> but eschew extraction of a few indi-
vidual parameters. In the worst case, disable <sys/sdt.h> macros entirely to eschew the compiled-in instrumentation. If DWARF
debuginfo was generated and preserved, a systemtap script could refer to the underlying source context variables instead of the
positional STAP_PROBE parameters.
SEE ALSO
stap(1),
stapprobes(3stap),
error::dwarf(7stap),
http://gcc.gnu.org/onlinedocs/gcc/Constraints.html,
http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation,
error::reporting(7stap)
ERROR::SDT(7stap)